From: ebiederm@xmission.com (Eric W. Biederman)
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Dave Hansen <dave@linux.vnet.ibm.com>,
containers@lists.osdl.org,
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
"Serge E. Hallyn" <serue@us.ibm.com>,
Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 3/3] ftrace: add ability to only trace swapper tasks
Date: Fri, 05 Dec 2008 08:35:26 -0800 [thread overview]
Message-ID: <m1zljapokx.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0812050715570.26316@gandalf.stny.rr.com> (Steven Rostedt's message of "Fri, 5 Dec 2008 07:23:07 -0500 (EST)")
Steven Rostedt <rostedt@goodmis.org> writes:
> Other pids get allocated per task. In the beginning of copy_process we
> have:
>
> if (pid != &init_struct_pid) {
> retval = -ENOMEM;
> pid = alloc_pid(task_active_pid_ns(p));
>
> Where alloc_pid allocates a pid structure. But this is only done if it is
> not a swapper task.
For PIDTYPE_PID. For sessions and process groups we don't always allocate them,
and attach_pid is fine.
There is a bit of oddness in the pid freeing case, in using an unhashed pid,
so cpu hotunplug might be a problem. But you certainly shouldn't be running
into this.
>> > When doing the code you suggested, I end up with only marking the last
>> > idle task to be created.
>>
>> Odd. It is all a linked list through the task structures.
>> I'm guessing the initialization isn't quite right.
>>
>> Weird.
>
> Do I need to change the loop to do_each_pid_thread?
> I'll try that later today.
I don't think so. I'm pretty certain we aren't passing the necessary
clone flags to make that case work for idle threads, and in fact we aren't
even cloning from the idle task when we create additional idle threads
so I don't see how do_each_pid_thread could work better.
That said do_each_pid_thread appears to be a proper superset of
do_each_pid_task so it should not be harmful.
I am all for figuring out how to remove this special case if we can.
Eric
next prev parent reply other threads:[~2008-12-05 16:35 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 5:26 [PATCH 0/3] ftrace: clean ups for tip Steven Rostedt
2008-12-04 5:26 ` [PATCH 1/3] fix the do_each_pid_task macro Steven Rostedt
2008-12-04 5:26 ` [PATCH 2/3] ftrace: use struct pid Steven Rostedt
2008-12-04 12:42 ` Eric W. Biederman
2008-12-04 12:56 ` Dave Hansen
2008-12-04 13:07 ` Dave Hansen
2008-12-04 13:40 ` Eric W. Biederman
2008-12-04 15:12 ` Dave Hansen
2008-12-04 15:35 ` Steven Rostedt
[not found] ` <m1prk8t5xr.fsf-B27657KtZYmhTnVgQlOflh2eb7JE58TQ@public.gmane.org>
2008-12-04 15:41 ` Dave Hansen
2008-12-04 15:41 ` Dave Hansen
2008-12-04 15:44 ` Steven Rostedt
2008-12-04 14:29 ` Steven Rostedt
2008-12-05 3:17 ` Dipankar Sarma
2008-12-04 12:55 ` Eric W. Biederman
2008-12-04 14:23 ` Steven Rostedt
2008-12-04 14:32 ` Eric W. Biederman
2008-12-04 16:22 ` Sukadev Bhattiprolu
2008-12-04 5:26 ` [PATCH 3/3] ftrace: add ability to only trace swapper tasks Steven Rostedt
2008-12-04 8:06 ` Ingo Molnar
2008-12-04 8:18 ` Andrew Morton
2008-12-04 9:10 ` Ingo Molnar
2008-12-04 12:59 ` Eric W. Biederman
2008-12-04 14:46 ` Steven Rostedt
2008-12-04 20:41 ` Eric W. Biederman
2008-12-04 20:57 ` Steven Rostedt
2008-12-04 21:43 ` Eric W. Biederman
[not found] ` <m1vdtzr4zn.fsf-B27657KtZYmhTnVgQlOflh2eb7JE58TQ@public.gmane.org>
2008-12-04 21:56 ` Steven Rostedt
2008-12-04 21:56 ` Steven Rostedt
2008-12-05 7:43 ` Eric W. Biederman
2008-12-05 12:23 ` Steven Rostedt
2008-12-05 16:35 ` Eric W. Biederman [this message]
2008-12-05 4:30 ` [PATCH] ftrace: use init_struct_pid as swapper pid Steven Rostedt
2008-12-05 13:51 ` Ingo Molnar
2008-12-04 15:36 ` [PATCH 3/3] ftrace: add ability to only trace swapper tasks Ingo Molnar
2008-12-04 15:47 ` Steven Rostedt
2008-12-04 13:12 ` Steven Rostedt
2008-12-04 13:52 ` Eric W. Biederman
[not found] ` <20081204052735.362609481-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>
2008-12-04 5:34 ` Wang Liming
2008-12-04 5:34 ` Wang Liming
[not found] ` <49376BFE.2010501-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2008-12-04 5:50 ` Wang Liming
2008-12-04 5:50 ` Wang Liming
2008-12-04 12:54 ` Eric W. Biederman
2008-12-04 12:54 ` Eric W. Biederman
2008-12-04 14:57 ` Steven Rostedt
2008-12-04 8:10 ` [PATCH 0/3] ftrace: clean ups for tip Ingo Molnar
2008-12-04 8:30 ` [PATCH] tracing: fix typo Ingo Molnar
2008-12-04 8:30 ` Ingo Molnar
2008-12-04 8:34 ` [PATCH] tracing: fix typo and missing inline function Ingo Molnar
2008-12-04 8:34 ` Ingo Molnar
2008-12-04 13:16 ` Steven Rostedt
2008-12-04 15:35 ` Ingo Molnar
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=m1zljapokx.fsf@frodo.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.osdl.org \
--cc=dave@linux.vnet.ibm.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=serue@us.ibm.com \
--cc=srostedt@redhat.com \
--cc=sukadev@linux.vnet.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.