From: Jim Newsome <jnewsome@torproject.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Christian Brauner <christian@brauner.io>,
linux-kernel@vger.kernel.org
Subject: Re: patch: do_wait: make PIDTYPE_PID case O(1) instead of O(n)
Date: Tue, 9 Mar 2021 10:18:18 -0600 [thread overview]
Message-ID: <383ff3ab-ef13-1c6e-7794-ecfffc6044d4@torproject.org> (raw)
In-Reply-To: <20210309085641.GB25222@redhat.com>
Thanks for the quick review!
On 3/9/21 02:56, Oleg Nesterov wrote:
> I'd suggest to put this PIDTYPE_PID code into the new function.
Done
> No, you don't need rcu lock, tasklist_lock is sufficient
Done
> This is wrong, you forgot to drop tasklist_lock.
Done
>> + real_parent = !target->real_parent ? target->parent :
>> + target->real_parent;
>
> Hmm, I don't understand the line above... perhaps it connects to the
> question below.
I'd mistakenly thought `real_parent` was NULL if the target wasn't being
traced (or was being traced by the real parent). It looks like indeed
this should always be set, though.
> Afaics, parent/real_parent can't be NULL if pid_task() succeeds.
Done
> Please redo and send V2 ;)
Sent with subject "[PATCH v2] do_wait: make PIDTYPE_PID case O(1)
instead of O(n)"
prev parent reply other threads:[~2021-03-09 16:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <b8591e67-1248-6c29-847e-d97e04b58210@torproject.org>
2021-03-09 8:56 ` Oleg Nesterov
2021-03-09 16:18 ` Jim Newsome [this message]
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=383ff3ab-ef13-1c6e-7794-ecfffc6044d4@torproject.org \
--to=jnewsome@torproject.org \
--cc=akpm@linux-foundation.org \
--cc=christian@brauner.io \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®