From: Kirill Tkhai <tkhai@yandex.ru>
To: Peter Zijlstra <peterz@infradead.org>
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 21:46:14 +0400 [thread overview]
Message-ID: <15591371577574@web20h.yandex.ru> (raw)
In-Reply-To: <20130618172805.GC16094@twins.programming.kicks-ass.net>
18.06.2013, 21:28, "Peter Zijlstra" <peterz@infradead.org>:
> 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.
They have different semantic and different ending.
Many places (as you can see from the second patch) need additional actions
between schedule() and next spin_lock(). Several places don't do the second
lock.
Kirill
next prev parent reply other threads:[~2013-06-18 17:46 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
2013-06-18 17:46 ` Kirill Tkhai [this message]
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=15591371577574@web20h.yandex.ru \
--to=tkhai@yandex.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/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