From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: jaxboe@fusionio.com, torvalds@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: add blk_run_queue_async
Date: Mon, 18 Apr 2011 15:55:04 -0400 [thread overview]
Message-ID: <BANLkTikOKji3_p+bqMO4zoSnXFunEdue0g@mail.gmail.com> (raw)
In-Reply-To: <20110418092647.GB3837@infradead.org>
On Mon, Apr 18, 2011 at 5:26 AM, Christoph Hellwig <hch@infradead.org> wrote:
> Instead of overloading __blk_run_queue to force an offload to kblockd
> add a new blk_run_queue_async helper to do it explicitly. I've kept
> the blk_queue_stopped check for now, but I suspect it's not needed
> as the check we do when the workqueue items runs should be enough.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: linux-2.6/block/blk-core.c
> ===================================================================
> --- linux-2.6.orig/block/blk-core.c 2011-04-18 10:48:11.010100413 +0200
> +++ linux-2.6/block/blk-core.c 2011-04-18 10:57:56.340262741 +0200
...
> @@ -317,6 +315,20 @@ void __blk_run_queue(struct request_queu
> EXPORT_SYMBOL(__blk_run_queue);
>
> /**
> + * blk_run_queue_async - run a single device queue in workqueue context
> + * @q: The queue to run
> + *
> + * Description:
> + * Tells kblockd to perform the equivalent of @blk_run_queue on behalf
> + * of us.
> + */
> +void blk_run_queue_async(struct request_queue *q)
> +{
> + if (likely(!blk_queue_stopped(q)))
> + queue_delayed_work(kblockd_workqueue, &q->delay_work, 0);
I know Jens already queued this up 'for-linus' but why not use
kblockd_schedule_work(q, &q->delay_work)?
next prev parent reply other threads:[~2011-04-18 19:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-18 9:26 Christoph Hellwig
2011-04-18 9:38 ` Jens Axboe
2011-04-18 15:33 ` Tao Ma
2011-04-18 16:33 ` Christoph Hellwig
2011-04-18 19:55 ` Mike Snitzer [this message]
2011-04-18 19:59 ` Christoph Hellwig
2011-04-18 20:01 ` Jens Axboe
2011-04-18 20:20 ` Mike Snitzer
2011-04-18 21:48 ` Mike Snitzer
2011-04-19 14:40 ` Jens Axboe
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=BANLkTikOKji3_p+bqMO4zoSnXFunEdue0g@mail.gmail.com \
--to=snitzer@redhat.com \
--cc=hch@infradead.org \
--cc=jaxboe@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®