From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk,
linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] [RFC] Add support for uevents on block device idle changes
Date: Wed, 18 Nov 2009 22:10:31 +0000 [thread overview]
Message-ID: <200911182310.31935.bzolnier@gmail.com> (raw)
In-Reply-To: <1258468659-5446-1-git-send-email-mjg@redhat.com>
On Tuesday 17 November 2009 15:37:39 Matthew Garrett wrote:
> @@ -1452,6 +1452,15 @@ static inline void __generic_make_request(struct bio *bio)
> if (should_fail_request(bio))
> goto end_io;
>
> + if (bio->bi_bdev->bd_disk->hysteresis_time &&
> + bio_has_data(bio) &&
> + !mod_timer(&bio->bi_bdev->bd_disk->hysteresis_timer,
> + jiffies+msecs_to_jiffies
> + (bio->bi_bdev->bd_disk->hysteresis_time))) {
> + bio->bi_bdev->bd_disk->idle = 0;
> + schedule_work(&bio->bi_bdev->bd_disk->idle_notify);
> + }
> +
Wouldn't it be more reliable to hook into places where block requests are
issued/completed instead of queued? This way you will not miss special
requests (some of them are quite common in practice and may take a relatively
long time to execute, i.e. FLUSH CACHE).
--
Bartlomiej Zolnierkiewicz
WARNING: multiple messages have this Message-ID (diff)
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk,
linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] [RFC] Add support for uevents on block device idle changes
Date: Wed, 18 Nov 2009 23:10:31 +0100 [thread overview]
Message-ID: <200911182310.31935.bzolnier@gmail.com> (raw)
In-Reply-To: <1258468659-5446-1-git-send-email-mjg@redhat.com>
On Tuesday 17 November 2009 15:37:39 Matthew Garrett wrote:
> @@ -1452,6 +1452,15 @@ static inline void __generic_make_request(struct bio *bio)
> if (should_fail_request(bio))
> goto end_io;
>
> + if (bio->bi_bdev->bd_disk->hysteresis_time &&
> + bio_has_data(bio) &&
> + !mod_timer(&bio->bi_bdev->bd_disk->hysteresis_timer,
> + jiffies+msecs_to_jiffies
> + (bio->bi_bdev->bd_disk->hysteresis_time))) {
> + bio->bi_bdev->bd_disk->idle = 0;
> + schedule_work(&bio->bi_bdev->bd_disk->idle_notify);
> + }
> +
Wouldn't it be more reliable to hook into places where block requests are
issued/completed instead of queued? This way you will not miss special
requests (some of them are quite common in practice and may take a relatively
long time to execute, i.e. FLUSH CACHE).
--
Bartlomiej Zolnierkiewicz
next prev parent reply other threads:[~2009-11-18 22:10 UTC|newest]
Thread overview: 73+ 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 14:37 ` Matthew Garrett
2009-11-17 15:55 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-17 15:55 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-17 16:09 ` [PATCH] [RFC] Add support for uevents on block device idle David Zeuthen
2009-11-17 16:09 ` [PATCH] [RFC] Add support for uevents on block device idle changes David Zeuthen
2009-11-17 18:57 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-17 18:57 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-18 19:30 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-18 19:30 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-18 19:40 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-18 19:40 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-18 19:47 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-18 19:47 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-18 19:53 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-18 19:53 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-18 20:03 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-18 20:03 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-18 20:07 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-18 20:07 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-18 21:06 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-18 21:06 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-18 21:29 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-18 21:29 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-18 21:35 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-18 21:35 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-18 21:39 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-18 21:39 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-18 21:45 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-18 21:45 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-18 21:33 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-18 21:33 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-18 21:40 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-18 21:40 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-19 11:09 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-19 11:09 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-19 13:01 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-19 13:01 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-19 13:29 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-19 13:29 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-19 14:16 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-19 14:16 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-19 14:25 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-19 14:25 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-19 14:30 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-19 14:30 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-19 14:34 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-19 14:34 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-19 14:48 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-19 14:48 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-19 15:00 ` [PATCH] [RFC] Add support for uevents on block device idle Kay Sievers
2009-11-19 15:00 ` [PATCH] [RFC] Add support for uevents on block device idle changes Kay Sievers
2009-11-20 20:29 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-20 20:29 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-22 23:37 ` [PATCH] [RFC] Add support for uevents on block device idle Pavel Machek
2009-11-22 23:37 ` [PATCH] [RFC] Add support for uevents on block device idle changes Pavel Machek
2009-11-23 14:12 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-23 14:12 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-23 14:17 ` [PATCH] [RFC] Add support for uevents on block device idle Jens Axboe
2009-11-23 14:17 ` [PATCH] [RFC] Add support for uevents on block device idle changes Jens Axboe
2009-11-23 14:25 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-23 14:25 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-23 14:31 ` [PATCH] [RFC] Add support for uevents on block device idle Jens Axboe
2009-11-23 14:31 ` [PATCH] [RFC] Add support for uevents on block device idle changes Jens Axboe
2009-11-23 14:42 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-23 14:42 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-11-23 19:50 ` [PATCH] [RFC] Add support for uevents on block device idle Jens Axboe
2009-11-23 19:50 ` [PATCH] [RFC] Add support for uevents on block device idle changes Jens Axboe
2009-11-23 19:54 ` [PATCH] [RFC] Add support for uevents on block device idle Matthew Garrett
2009-11-23 19:54 ` [PATCH] [RFC] Add support for uevents on block device idle changes Matthew Garrett
2009-12-11 21:20 ` [RFC] Add support for events " Matthew Garrett
2009-11-18 22:10 ` Bartlomiej Zolnierkiewicz [this message]
2009-11-18 22:10 ` [PATCH] [RFC] Add support for uevents " 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=200911182310.31935.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-hotplug@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.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 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.