Re: Strange IDE performance change in 2.6.1-rc1 (again)

From: jw schultz
Date: Sat Jan 03 2004 - 22:03:57 EST


On Fri, Jan 02, 2004 at 11:15:18PM -0500, Valdis.Kletnieks@xxxxxx wrote:
> On Sat, 03 Jan 2004 04:33:28 +0100, Tobias Diedrich <ranma@xxxxxx> said:
>
> > Very interesting tidbit:
> >
> > with 2.6.1-rc1 and "dd if=/dev/hda of=/dev/null" I get stable 28 MB/s,
> > but with "cat < /dev/hda > /dev/null" I get 48 MB/s according to "vmstat
> > 5".
>
> 'cat' is probably doing a stat() on stdout and seeing it's connected to /dev/null
> and not even bothering to do the write() call. I've seen similar behavior in other
> GNU utilities.

That is unlikely.

However, i have seen some versions of cat check the input
file and if it is mappable mmap it instead of read. Given
that a write to /dev/null returns count without
copy_from_user the mapped page never faults so there is no
disk io.




--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw@xxxxxxxxxx

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