All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Con Kolivas <kernel@kolivas.org>
Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk, mingo@elte.hu,
	peterz@infradead.org
Subject: Re: question about blk_schedule_flush_plug
Date: Mon, 23 May 2011 09:43:49 +0200	[thread overview]
Message-ID: <1306136629.4876.13.camel@marge.simson.net> (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?

Releasing/retaking rq->lock is nothing new:

static void idle_balance(int this_cpu, struct rq *this_rq)
{
...
        /*
         * Drop the rq->lock, but keep IRQ/preempt disabled.
         */
        raw_spin_unlock(&this_rq->lock);

See also need_resched, and double_lock_balance() instances.

	-Mike


      parent reply	other threads:[~2011-05-23  7:43 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
2011-05-23  7:43 ` Mike Galbraith [this message]

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=1306136629.4876.13.camel@marge.simson.net \
    --to=efault@gmx.de \
    --cc=axboe@kernel.dk \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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.