lkml.org 
[lkml]   [2008]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + make-get_user_pages-interruptible.patch added to -mm tree
On 12/01, Ying Han wrote:
>
> On Mon, Dec 1, 2008 at 3:09 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > Note that fatal_signal_pending() is not an exact replacement for
> > sigkill_pending() - fatal_signal_pending() doesn't test the shared
> > pending signals.
> >
> yeah, i noticed that and that is why i used the sigkill_pending
> initially. But after a deeper look
> at the signal code, i found for SIGKILL ( signal we care about in this
> patch ), tsk->pending is a
> superset of tsk->signal->shared_pending.

Yes. If we have SIGKILL in ->shared_pending, we must have it in
in ->pending too.

The only exception is when we send SIGKILL to the already dying task
which has already dequeued SIGKILL from ->pending. And we do have a
special case: coredumping. elf_core_dump() does get_user_pages()
when the process is "almost" dead, it has SIGNAL_GROUP_EXIT.

So, if get_user_pages() calls sigkill_pending() instead of
fatal_signal_pending(), this can help. But:

- this relies on the fact that we always queue SIGKILL
even if the task is dead. This behaviour can be changed.

- this doesn't stop the coredumping, it will continue
with DUMP_SEEK(). Yes, this is better if we want to
stop this thread to populate the memory, but I think
we should just fix the coredumping - it should be
interruptible.

Actually, the patch exists:
http://marc.info/?l=linux-kernel&m=121665710711931

Oleg.



\
 
 \ /
  Last update: 2008-12-02 14:31    [W:0.060 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site