[Devel] [PATCH rh7] x86: arch_free_page() introduced
Vladimir Davydov
vdavydov at virtuozzo.com
Tue Nov 17 06:20:09 PST 2015
On Thu, Nov 12, 2015 at 10:01:14PM +0400, Stanislav Kinsburskiy wrote:
> @@ -0,0 +1,23 @@
> +#ifndef _ASM_X86_FREE_PAGE_H
> +#define _ASM_X86_FREE_PAGE_H
> +
> +#ifdef __KERNEL__
> +
> +#ifndef __ASSEMBLY__
> +
> +#include <linux/jump_label.h>
> +
> +#define HAVE_ARCH_FREE_PAGE
> +
> +extern struct static_key zero_free_pages;
> +extern void do_zero_pages(struct page *page, int order);
> +
> +static __always_inline void arch_free_page(struct page *page, int order)
> +{
> + if (static_key_false(&zero_free_pages))
> + do_zero_pages(page, order);
> +}
There is no point in making this feature arch-dependant now, as you use
jump labels, which are arch-independent. The only reason why I had to
overwrite arch_free_page in PCS6 is that I had to write some asm code to
implement functionality close to that provided by jump labels, which are
absent in RH6-based kernels. Please move it to mm/page_alloc.c.
Thanks.
More information about the Devel
mailing list