This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: context[2] stuck: (null)
- From: Arkady <arkady dot miasnikov at gmail dot com>
- To: David Smith <dsmith at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 12 Jul 2017 16:16:30 +0300
- Subject: Re: context[2] stuck: (null)
- Authentication-results: sourceware.org; auth=none
- References: <CANA-60q25-tnw72LjrtgMaavsE=VCee4-66fkOHbKBAHWSNqDA@mail.gmail.com> <CANA-60pAhrCXkzkNS5sY_Cypd-_ky=zfHmxHi-dj06QFkrOQAg@mail.gmail.com> <CANA-60rKy7uxpeF_zSV=nMwGO_oRp_rNHnt-PrWRzG4QivKsrQ@mail.gmail.com> <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