Re: PATCH 2.3.26: kmalloc GFP_ZERO

Jakub Jelinek (jakub@redhat.com)
Tue, 9 Nov 1999 15:18:18 +0100


On Tue, Nov 09, 1999 at 03:07:12PM +0100, Jes Sorensen wrote:
> >>>>> "Mikulas" == Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> writes:
>
> Mikulas> On 9 Nov 1999, Jes Sorensen wrote:
> >> Why, all it does is to provide an obfuscated macro for something
> >> which is not a problem. Right now some code will do kmalloc();
> >> memset();, it's very clean and easy to deal with.
>
> Mikulas> GFP_ZERO is not so stupid idea. It allows us to implement
> Mikulas> something like zero-page cache. While processor has nothing
> Mikulas> to do, it can clear free pages, and when GFP_ZERO request
> Mikulas> comes, it returns page directly without clearing overhead.
>
> Which I doubt is a win anyway, all you do is to sit there and thrash
> your cache in the background.

Even if you do it in a smart way (avoid trashing caches by bypassing them),
it turned out to be very little win (I have implemented it on sparc64 some
months ago and lmbench numbers were better just by a very small margin so I
scratched it).

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.18 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

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