Re: [PATCH] mm: fix page_mkclean_one

From: Linus Torvalds
Date: Thu Dec 28 2006 - 12:30:30 EST




On Thu, 28 Dec 2006, Russell King wrote:
>
> and if you look at glibc's memset() function, you'll notice that's exactly
> what you expect if you pass a non-8bit value to it. Ergo, what you're
> seeing is utterly expected given glibc's memset() implementation on ARM.

Guys, you _really_ should fix memset(). What you describe is a _bug_.

"memset()" takes an "int" as its argument (always has), and has to convert
it to a byte _itself_. It may not be common, but it's perfectly normal, to
pass it values outside 0-255 (negative values that still fit in a "signed
char" in particular are very normal, but my usage of "let the thing
truncate it itself" is also quite fine).

> Fixing Linus' test program to pass nr & 255 to memset

No. I'm almost certain that that is not a "fix", it's a workaround for a
serious bug in your glibc crap.

But it does explain all the unexpected strange behaviour (and the really
small writeback size - now it doesn't need any /proc/sys/vm/dirty_ratio
assumptions to be explicable.

Linus
-
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/