lkml.org 
[lkml]   [2005]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.12-rc2 and as-iosched
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-18 17:59    [W:0.030 / U:7.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site