From: Jens Axboe <jens.axboe@oracle.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Pavel Machek <pavel@ucw.cz>, Kay Sievers <kay.sievers@vrfy.org>,
David Zeuthen <david@fubar.dk>,
linux-kernel@vger.kernel.org, linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] [RFC] Add support for uevents on block device idle
Date: Mon, 23 Nov 2009 19:50:00 +0000 [thread overview]
Message-ID: <20091123195000.GK8742@kernel.dk> (raw)
In-Reply-To: <20091123144238.GA10275@srcf.ucam.org>
On Mon, Nov 23 2009, Matthew Garrett wrote:
> On Mon, Nov 23, 2009 at 03:31:40PM +0100, Jens Axboe wrote:
>
> > Well, take a look at laptop mode. A timer per-io is probably
> > unavoidable, but doing it at IO completion could mean a big decrease in
> > timer activity as opposed to doing it for each incoming IO. And since
> > you are looking at when the disk is idle, it makes a lot more sense to
> > me to do that when the we complete a request (and have no further
> > pending IO) rather than on incoming IO.
>
> Right. The current implementation I have does a del_timer() at
> submission (which should be moved to post-merge) - that should be cheap
> in the common case of a new command being submitted when there's already
> commands outstanding. There's then a mod_timer() at completion time.
> That's still a certain amount of expense, but it should be less.
>
> > Your biggest performance issue here is going to be sync IO, since the
> > disk will go idle very briefly before being kicked into action again.
>
> Ok, I'll try to benchmark that.
>
> The alternative (polling) method would be something much like Kay
> suggested - either add an extra field to stat or an extra sysfs file,
> then invalidate that on submission and set to jiffies on completion.
> It's not ideal from a wakeups perspective, but it's pretty low impact on
> the kernel side.
If the polling works out, then yes that approach is certainly a lot
better from a performance impact pov.
What kind of time intervals are you targetting?
--
Jens Axboe
next prev parent reply other threads:[~2009-11-23 19:50 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 14:37 [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-17 15:55 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-17 16:09 ` David Zeuthen
2009-11-17 18:57 ` Matthew Garrett
2009-11-18 19:30 ` Kay Sievers
2009-11-18 19:40 ` Matthew Garrett
2009-11-18 19:47 ` Kay Sievers
2009-11-18 19:53 ` Matthew Garrett
2009-11-18 20:03 ` Kay Sievers
2009-11-18 20:07 ` Matthew Garrett
2009-11-18 21:06 ` Kay Sievers
2009-11-18 21:29 ` Kay Sievers
2009-11-18 21:35 ` Matthew Garrett
2009-11-18 21:39 ` Kay Sievers
2009-11-18 21:45 ` Matthew Garrett
2009-11-18 21:33 ` Matthew Garrett
2009-11-18 21:40 ` Kay Sievers
2009-11-19 11:09 ` Kay Sievers
2009-11-19 13:01 ` Matthew Garrett
2009-11-19 13:29 ` Kay Sievers
2009-11-19 14:16 ` Matthew Garrett
2009-11-19 14:25 ` Kay Sievers
2009-11-19 14:30 ` Matthew Garrett
2009-11-19 14:34 ` Kay Sievers
2009-11-19 14:48 ` Matthew Garrett
2009-11-19 15:00 ` Kay Sievers
2009-11-20 20:29 ` Matthew Garrett
2009-11-22 23:37 ` Pavel Machek
2009-11-23 14:12 ` Matthew Garrett
2009-11-23 14:17 ` Jens Axboe
2009-11-23 14:25 ` Matthew Garrett
2009-11-23 14:31 ` Jens Axboe
2009-11-23 14:42 ` Matthew Garrett
2009-11-23 19:50 ` Jens Axboe [this message]
2009-11-23 19:54 ` Matthew Garrett
2009-11-18 22:10 ` [PATCH] [RFC] Add support for uevents on block device idle changes Bartlomiej Zolnierkiewicz
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=20091123195000.GK8742@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=david@fubar.dk \
--cc=kay.sievers@vrfy.org \
--cc=linux-hotplug@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=pavel@ucw.cz \
/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;
as well as URLs for NNTP newsgroup(s).