From: Oleg Nesterov <oleg@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, jstancek@redhat.com, clm@fb.com,
vladimir.murzin@arm.com, pjt@google.com, efault@gmx.de,
tglx@linutronix.de, hpa@zytor.com, neilb@suse.de
Subject: Re: [PATCH] sched/wait: Fix the signal handling fix
Date: Mon, 14 Dec 2015 19:50:04 +0100 [thread overview]
Message-ID: <20151214185004.GA27367@redhat.com> (raw)
In-Reply-To: <20151213211116.GK6373@twins.programming.kicks-ass.net>
Peter, sorry. I didn't actually read this patch yet (and a lot of previous
emails). Will try tomorrow, I am not even sure I understand the problem(s)
correctly. But let me ask one question anyway,
On 12/13, Peter Zijlstra wrote:
>
> --- a/kernel/sched/wait.c
> +++ b/kernel/sched/wait.c
> @@ -392,7 +392,7 @@ __wait_on_bit(wait_queue_head_t *wq, str
> do {
> prepare_to_wait(wq, &q->wait, mode);
> if (test_bit(q->key.bit_nr, q->key.flags))
> - ret = (*action)(&q->key);
> + ret = (*action)(&q->key, mode);
And every action() should check signal_pending_state()...
So why we can't change __wait_on_bit/etc instead and remove all the signal-
pending checks from the callbacks? It seems that we can just check
signal_pending_state() before prepare_to_wait(). Or perhaps we can add
another helper which acts like prepare_to_wait_event().
Yes, some callers want -EINTR, some -ERESTARTSYS, but this shouldn't be a
problem.
And sorry if this was already discussed, another case when I am trying to
return to lkml with a lot of unread emails.
Oleg.
next prev parent reply other threads:[~2015-12-14 18:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-13 21:11 [PATCH] sched/wait: Fix the signal handling fix Peter Zijlstra
2015-12-14 18:50 ` Oleg Nesterov [this message]
2015-12-14 21:11 ` Peter Zijlstra
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=20151214185004.GA27367@redhat.com \
--to=oleg@redhat.com \
--cc=clm@fb.com \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=jstancek@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vladimir.murzin@arm.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