From: Peter Zijlstra <peterz@infradead.org>
To: Kirill Tkhai <tkhai@yandex.ru>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH 1/2] sched: Add schedule_(raw_)spin_unlock and schedule_(raw_)spin_unlock_irq
Date: Tue, 18 Jun 2013 19:28:05 +0200 [thread overview]
Message-ID: <20130618172805.GC16094@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1981131371569812@web20h.yandex.ru>
On Tue, Jun 18, 2013 at 07:36:52PM +0400, Kirill Tkhai wrote:
> Helpers for replacement repeating patterns:
>
> 1)spin_unlock(lock);
> schedule();
> 2)spin_unlock_irq(lock);
> schedule();
>
I just noticed this; the existing schedule_preempt_disabled() is
equivalent to:
preempt_enable()
schedule()
preempt_disable()
So I somewhat expected these new primitives to be:
spin_unlock()
schedule()
spin_lock()
Now I haven't actually looked at the usage patch to see what the
converted sites look like (thanks for adding that one though!).
My OCD just triggered on the preemption and locked schedule calls having
different semantics.
next prev parent reply other threads:[~2013-06-18 17:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 15:36 [PATCH 1/2] sched: Add schedule_(raw_)spin_unlock and schedule_(raw_)spin_unlock_irq Kirill Tkhai
2013-06-18 17:28 ` Peter Zijlstra [this message]
2013-06-18 17:46 ` Kirill Tkhai
2013-06-24 12:54 ` Thomas Gleixner
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=20130618172805.GC16094@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tkhai@yandex.ru \
/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