From: Tejun Heo <tj@kernel.org>
To: paulmck@linux.vnet.ibm.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question about synchronize_sched_expedited()
Date: Mon, 25 Oct 2010 18:03:43 +0200 [thread overview]
Message-ID: <4CC5AA5F.9060909@kernel.org> (raw)
In-Reply-To: <20101025154358.GA6919@linux.vnet.ibm.com>
Hello, Paul.
On 10/25/2010 05:43 PM, Paul E. McKenney wrote:
> Hello, Tejun,
>
> I was taking another look at synchronize_sched_expedited(), and was
> concerned about the scenario listed out in the following commit.
> Is this scenario a real problem, or am I missing the synchronization
> that makes it safe?
>
> (If my concerns are valid, I should also be able to change this
> to non-atomically increment synchronize_sched_expedited_count, but
> one step at a time...)
I think your concern is valid and this can happen w/o preemption given
enough cpus and perfect timing. Was the original code free from this
problem?
IMHO the counter based mechanism is a bit too difficult to ponder and
verify. Can we do more conventional double queueing (ie. flipping
pending and executing queues so that multiple sync calls can get
coalesced while another one is in progress)? That's what the code is
trying to achieve anyway, right?
Thanks.
--
tejun
next prev parent reply other threads:[~2010-10-25 16:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 15:43 Question about synchronize_sched_expedited() Paul E. McKenney
2010-10-25 16:03 ` Tejun Heo [this message]
2010-10-25 19:41 ` Paul E. McKenney
2010-10-26 9:25 ` Tejun Heo
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=4CC5AA5F.9060909@kernel.org \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.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