From: Andi Kleen <andi@firstfloor.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Andi Kleen <andi@firstfloor.org>,
Ivo Sieben <meltedpianoman@gmail.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
linux-serial@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [REPOST] RFC: sched: Prevent wakeup to enter critical section needlessly
Date: Wed, 10 Oct 2012 16:02:49 +0200 [thread overview]
Message-ID: <20121010140249.GX16230@one.firstfloor.org> (raw)
In-Reply-To: <20121009151729.GA3521@redhat.com>
> wait_event:
>
> prepare_to_wait(wq) // takes wq->lock
>
> if (!CONDITION)
> schedule();
>
> Now,
>
> CONDITION = 1;
> wake_up(wq);
>
> at least need the full mb() before lits_empty().
You're right, but it would probably only matter for inlining with LTO
(if the LTO compiler ever decides to do that)
Without that a call should be always enough barrier in practice.
So yes I would add the mb, but most likely it will not make much
difference. Just make sure to comment it.
-Andi
next prev parent reply other threads:[~2012-10-10 14:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 13:06 [PATCH] RFC: sched: Prevent wakeup to enter critical section needlessly Ivo Sieben
2012-09-24 13:06 ` Ivo Sieben
2012-10-09 11:30 ` [REPOST] " Ivo Sieben
2012-10-09 11:30 ` Ivo Sieben
2012-10-09 13:37 ` Andi Kleen
2012-10-09 13:37 ` Andi Kleen
2012-10-09 14:15 ` Peter Zijlstra
2012-10-09 15:17 ` Oleg Nesterov
2012-10-10 14:02 ` Andi Kleen [this message]
2012-10-18 8:30 ` [PATCH-v2] " Ivo Sieben
2012-10-18 8:30 ` Ivo Sieben
2012-10-25 10:12 ` [REPOST-v2] " Ivo Sieben
2012-10-25 10:12 ` Ivo Sieben
2012-11-19 7:30 ` Ivo Sieben
2012-11-19 7:30 ` Ivo Sieben
2012-11-19 10:20 ` Preeti U Murthy
2012-11-19 15:10 ` Oleg Nesterov
2012-11-19 15:34 ` Ivo Sieben
2012-11-19 15:49 ` Oleg Nesterov
2012-11-21 13:03 ` Ivo Sieben
2012-11-21 13:47 ` Alan Cox
2012-11-21 13:58 ` 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=20121010140249.GX16230@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=alan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=meltedpianoman@gmail.com \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.