Re: Increase page fault rate by prezeroing V1 [1/3]: Introduce __GFP_ZERO

From: Andi Kleen
Date: Tue Dec 21 2004 - 17:41:46 EST


Christoph Lameter <clameter@xxxxxxx> writes:
> @@ -0,0 +1,52 @@
> +/*
> + * Zero a page.
> + * rdi page
> + */
> + .globl zero_page
> + .p2align 4
> +zero_page:
> + xorl %eax,%eax
> + movl $4096/64,%ecx
> + shl %ecx, %esi

Surely must be shl %esi,%ecx


> +zero_page_c:
> + movl $4096/8,%ecx
> + shl %ecx, %esi

Same.

Haven't tested.

But for the one instruction it seems overkill to me to have a new
function. How about you just extend clear_page with the order argument?

BTW I think Andrea has been playing with prezeroing on x86 and
he found no benefit at all. So it's doubtful it makes any sense
on x86/x86-64.

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