All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Kenneth Parrish <Kenneth.Parrish@family-bbs.org>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: 2.6.12-rc2 and as-iosched
Date: Mon, 18 Jul 2005 15:49:33 +0200	[thread overview]
Message-ID: <20050718134933.GA1890@suse.de> (raw)
In-Reply-To: <20050718115929.GE2403@suse.de>

On Mon, Jul 18 2005, Jens Axboe wrote:
> On Mon, Jul 18 2005, Kenneth Parrish wrote:
> > Randy> Need more info.
> > 
> >         Greetings.  :)
> > CONFIG_HZ_ changes the block device elevator time-out values -- didn't see.
> 
> I cannot reproduce here with cfq and HZ == 250, the jiffies <-> msec
> conversions are working fine. Please provide a proper bug report, did
> you change the values and not getting the expected back, or what is
> going wrong??

ok, AS is definitely broken, it does an internal HZ <-> msec conversion
in the store/show functions as well. This should fix it.

--- /opt/kernel/linux-2.6.13-rc3/drivers/block/as-iosched.c	2005-07-13 06:46:46.000000000 +0200
+++ linux-2.6.13-rc3/drivers/block/as-iosched.c	2005-07-18 15:46:23.000000000 +0200
@@ -1935,23 +1935,15 @@
 static ssize_t
 as_var_show(unsigned int var, char *page)
 {
-	var = (var * 1000) / HZ;
 	return sprintf(page, "%d\n", var);
 }
 
 static ssize_t
 as_var_store(unsigned long *var, const char *page, size_t count)
 {
-	unsigned long tmp;
 	char *p = (char *) page;
 
-	tmp = simple_strtoul(p, &p, 10);
-	if (tmp != 0) {
-		tmp = (tmp * HZ) / 1000;
-		if (tmp == 0)
-			tmp = 1;
-	}
-	*var = tmp;
+	*var = simple_strtoul(p, &p, 10);
 	return count;
 }
 

-- 
Jens Axboe


  reply	other threads:[~2005-07-18 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-18  9:04 2.6.12-rc2 and as-iosched Kenneth Parrish
2005-07-18 11:59 ` Jens Axboe
2005-07-18 13:49   ` Jens Axboe [this message]
2005-07-19  1:58     ` Kenneth Parrish
  -- strict thread matches above, loose matches on Subject: below --
2005-07-17  6:06 Kenneth Parrish
2005-07-18  2:52 ` randy_dunlap
2005-07-17  3:46 Kenneth Parrish

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=20050718134933.GA1890@suse.de \
    --to=axboe@suse.de \
    --cc=Kenneth.Parrish@family-bbs.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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.