public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Arkady <arkady.miasnikov@gmail.com>
To: David Smith <dsmith@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: context[2] stuck: (null)
Date: Wed, 12 Jul 2017 13:16:00 -0000	[thread overview]
Message-ID: <CANA-60rDmaWUKcPgy=dsShfQLnyG-nWQCXunffrNTBKu0AJTpw@mail.gmail.com> (raw)
In-Reply-To: <CAKFOr-ZzbumvHnZuZ3cHY5ZVG7uY9wnR4Cft3ghjE+FuSJTHNg@mail.gmail.com>

On Wed, Jul 12, 2017 at 3:58 PM, David Smith <dsmith@redhat.com> wrote:
> On Tue, Jul 11, 2017 at 1:46 AM, Arkady <arkady.miasnikov@gmail.com> wrote:
>> Update. Some of the system calls I am doing in the begin probe are
>> blocking. I understand that it will break things on multicore systems.
>> Am I right?
>
> Yes. Systemtap probes can never block.
>
> Perhaps we can suggest some ideas if you tell us a bit more of the
> background of what you are trying to do here.

My goal is to allocate the shared memory - one or more large (100s of
MBs) vzallocs,
add a dozen files to the sysfs and debugfs.
Some of the things I am doing involve kernel APIs which block. I was thinking
about the following options

*  Add a user defined hook in the systemtap_module_init() before "probe begin"
*  Make probes begin and end a special case and allow blocking
*  A separate driver which creates things I need in the kernel and "exports" API
*  Ask a kernel tasklet/workq/whatever to do the initialization

The first was easiest to implement and allowed me to solve the problem here and
now.
The second option involves SystemTap hacking which I am trying to avoid
because of the maintenance overhead in the future
A separate driver complicates boot and introduce security risks which I would
like to avoid for my specific application unless absolutely necessary.
The last option - take the initialization offline - a tasklet could do
the work. It
was longer to develop and the hour was late.

>
> --
> David Smith
> Principal Software Engineer
> Red Hat

  reply	other threads:[~2017-07-12 13:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 15:16 Arkady
2017-07-11  6:25 ` Arkady
2017-07-11  6:47   ` Arkady
2017-07-11 10:31     ` Arkady
2017-07-12 13:01       ` David Smith
2017-07-12 12:58     ` David Smith
2017-07-12 13:16       ` Arkady [this message]
2017-07-12 13:55         ` David Smith
2017-07-12 14:41           ` Arkady
2017-07-12 15:39             ` Arkady
2017-07-14 13:44               ` Arkady
2017-07-14 15:16               ` David Smith
2017-07-14 16:38                 ` Arkady
2017-07-14 17:40                   ` Arkady
2017-07-16 16:33                     ` Arkady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANA-60rDmaWUKcPgy=dsShfQLnyG-nWQCXunffrNTBKu0AJTpw@mail.gmail.com' \
    --to=arkady.miasnikov@gmail.com \
    --cc=dsmith@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).