From: Oleg Nesterov <oleg@redhat.com>
To: David Howells <dhowells@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Roland McGrath <roland@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm 3/3] proc: make task_sig() lockless
Date: Wed, 24 Mar 2010 16:00:27 +0100 [thread overview]
Message-ID: <20100324150027.GA8417@redhat.com> (raw)
In-Reply-To: <11571.1269419842@redhat.com>
On 03/24, David Howells wrote:
>
> Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > Yes. From the changelog:
> >
> > Of course, this means we read pending/blocked/etc nonatomically,
> > but I hope this is OK for fs/proc.
>
> Ah, yes. I read that as you meant how procfs accessed the actual data
> structures, not how the user accessed procfs. It might be worth clarifying
> that.
OK, agreed.
> Acked-by: David Howells <dhowells@redhat.com>
Thanks,
> > > Probably we can change do_task_stat() to avod ->siglock too, except
>
> Btw, avoid has an 'i' in it... :-)
Another reason to update the changelog ;)
Andrew, please find the updated changelog for proc-make-task_sig-lockless.patch
If this is not convenient, please ignore or tell me what is the "right" way
to fix the changelog when the patch is already in -mm.
------------------------------------------------------------------------------
Now that task->signal can't go away and collect_sigign_sigcatch() is
rcu-safe, task_sig() doesn't need ->siglock.
Remove lock_task_sighand() and unnecessary sigemptyset's, move
collect_sigign_sigcatch() under rcu_read_lock().
Of course, this means we read pending/blocked/etc nonatomically and we
can report this info in some intermediate state. Say, a signal can be
reported as both pending and ignored, or we can report ->sigpending != 0
while pending/shpending are empty, etc. Hopefully this is OK for proc,
we never promised this info should be atomic.
Probably we can change do_task_stat() to avoid ->siglock too, except we
can't get tty_nr lockless.
Also, remove the "is this correct?" comment. I think it is safe to
dereference __task_cred(p)->user under rcu lock. In any case, ->siglock
can't help to protect cred->user.
next prev parent reply other threads:[~2010-03-24 15:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 18:41 [PATCH -mm 3/3] proc: make task_sig() lockless Oleg Nesterov
2010-03-23 8:30 ` David Howells
2010-03-23 8:37 ` David Howells
2010-03-23 10:57 ` Oleg Nesterov
2010-03-24 8:37 ` David Howells
2010-03-24 15:00 ` Oleg Nesterov [this message]
2010-04-09 19:59 ` Roland McGrath
2010-04-10 8:16 ` David Howells
2010-04-12 19:50 ` Oleg Nesterov
2010-04-13 6:30 ` Roland McGrath
2010-04-13 20:00 ` Oleg Nesterov
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=20100324150027.GA8417@redhat.com \
--to=oleg@redhat.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@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