[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20081202132609.GA8159@redhat.com>
Date: Tue, 2 Dec 2008 14:26:09 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Ying Han <yinghan@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, menage@...gle.com,
penberg@...helsinki.fi, nickpiggin@...oo.com.au, hugh@...itas.com,
matthew@....cx, rientjes@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: + 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@...ux-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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists