Re: [PATCH 4/5] -march=native: REP STOSB
From: Andi Kleen
Date: Fri Dec 08 2017 - 14:08:12 EST
Alexey Dobriyan <adobriyan@xxxxxxxxx> writes:
>
> +#ifdef CONFIG_MARCH_NATIVE_REP_STOSB
> +static __always_inline void clear_page(void *page)
> +{
> + uint32_t len = PAGE_SIZE;
> + asm volatile (
> + "rep stosb"
> + : "+D" (page), "+c" (len)
> + : "a" (0)
> + : "memory"
> + );
> +}
clear_page_64 already patches in the equivalent code sequence,
it's clear_page_erms()
It's very doubtful that this patch is worth it.
-Andi