All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Con Kolivas <kernel@kolivas.org>
Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk, mingo@elte.hu
Subject: Re: question about blk_schedule_flush_plug
Date: Mon, 23 May 2011 09:36:56 +0200	[thread overview]
Message-ID: <1306136216.18455.3.camel@twins> (raw)
In-Reply-To: <201105231705.20168.kernel@kolivas.org>

On Mon, 2011-05-23 at 17:05 +1000, Con Kolivas wrote:
> I was looking at the scheduler changes going into 2.6.39 again and wondered 
> about the use of blk_schedule_flush_plug smack in the middle of schedule()
> 
> It looks like this:
> 			if (blk_needs_flush_plug(prev)) {
> 				raw_spin_unlock(&rq->lock);
> 				blk_schedule_flush_plug(prev);
> 				raw_spin_lock(&rq->lock);
> 			}
> 
> Now call me suspicious but to my eyes it looks really dubious unlocking the 
> runqueue like that right in the heart of schedule().
> 
> Comments?

Yeah, that's quite all-right, both pre_schedule() and idle_balance()
already did that too.

We can safely release the runqueue lock after deactivate_task() and
before put_prev_task().

  reply	other threads:[~2011-05-23  7:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23  7:05 question about blk_schedule_flush_plug Con Kolivas
2011-05-23  7:36 ` Peter Zijlstra [this message]
2011-05-23  7:43 ` Mike Galbraith

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=1306136216.18455.3.camel@twins \
    --to=peterz@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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.