From: Oleg Nesterov <oleg@redhat.com>
To: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
NeilBrown <nfbrown@novell.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
Mike Galbraith <efault@gmx.de>, Ingo Molnar <mingo@kernel.org>,
Peter Anvin <hpa@zytor.com>,
vladimir.murzin@arm.com, linux-tip-commits@vger.kernel.org,
jstancek@redhat.com
Subject: Re: [tip:locking/core] sched/wait: Fix signal handling in bit wait helpers
Date: Tue, 15 Dec 2015 20:01:32 +0100 [thread overview]
Message-ID: <20151215190132.GB19007@redhat.com> (raw)
In-Reply-To: <CAPM31R+ohAB3w+wTWj08LfM9ePP8tfyW-Vie5Uef-RwCu-b4sw@mail.gmail.com>
On 12/11, Paul Turner wrote:
>
> Peter's proposed follow-up above looks strictly more correct. We need
> to evaluate the potential existence of a signal, *after* we return
> from schedule,
I still don't understand this...
signal_pending_check(current->state) before schedule() should be fine
even if it actually reads current->state twice and it races with wakeup/
signal_wake_up() which can change the caller's state.
> but in the context of the state which we previously
> _entered_ schedule() on.
Yes, but only if we do this after return from schedule().
But somehow this change helps. It adds the subtle difference(s), for example
__wait_on_bit_lock() won't do another test_and_set_bit() if the sleeping
caller is killed, but this shouldn't matter.
And if this does matter because it has a buggy user, then it is not clear why
the change from Vladimir helps too.
The common part is that both changes make "return 1" impossible, but according
to another email from Peter this just makes the fail less likely.
I am really puzzled.
Oleg.
next prev parent reply other threads:[~2015-12-15 19:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 15:35 [BISECTED] rcu_sched self-detected stall since 3.17 Vladimir Murzin
2015-12-01 11:50 ` Vladimir Murzin
2015-12-01 13:04 ` Peter Zijlstra
2015-12-02 9:04 ` Vladimir Murzin
2015-12-04 11:52 ` [tip:locking/core] sched/wait: Fix signal handling in bit wait helpers tip-bot for Peter Zijlstra
2015-12-08 10:47 ` Peter Zijlstra
2015-12-09 1:06 ` NeilBrown
2015-12-09 7:40 ` Peter Zijlstra
2015-12-09 21:30 ` NeilBrown
2015-12-10 13:09 ` Peter Zijlstra
2015-12-11 11:30 ` Paul Turner
2015-12-11 11:39 ` Peter Zijlstra
2015-12-11 11:53 ` Vladimir Murzin
2015-12-11 13:08 ` Jan Stancek
2015-12-11 13:22 ` Peter Zijlstra
2015-12-11 17:57 ` Vladimir Murzin
2015-12-15 18:16 ` Oleg Nesterov
2015-12-15 19:01 ` Oleg Nesterov [this message]
2015-12-15 16:56 ` [BISECTED] rcu_sched self-detected stall since 3.17 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=20151215190132.GB19007@redhat.com \
--to=oleg@redhat.com \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=jstancek@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=nfbrown@novell.com \
--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;
as well as URLs for NNTP newsgroup(s).