This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: sleeping, locks and debug kernels
On 12/12/2011 11:54 AM, Oleg Nesterov wrote:
> On 12/12, Mark Wielaard wrote:
>>
>> On Mon, Dec 12, 2011 at 05:58:51PM +0100, Oleg Nesterov wrote:
>>>
>>> Yes, this is the problem. Although I am not sure how "goes over every
>>> task" can work under rcu_read_lock() without races with clone(). For
>>> example, even "attach all threads in this thread group" is not simple.
>>> But this is off-topic.
>>
>> Maybe off-topic, but it would be useful to know what the issues with
>> going over all threads while holding (or even while not holding)
>> rcu_read_lock.
>
> You can miss a freshly cloned thread. UTRACE_ATTACH_CREATE_ATOMIC makes
> this easier, you can use tasklist_lock. But even in this case you probably
> need to hook ->report_clone().
We certainly do hook report_clone().
If I remember correctly, the tasklist_lock (or perhaps the functions
that access it) wasn't exported, but I haven't looked in a year so I
could be wrong now.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)