17.11.2015 15:20, Vladimir Davydov пишет:
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.
If we will make this function generic, then we have to declare "zero_free_pages" as generic (which is more or less ok) and define do_zero_pages for the case, when HAVE_ARCH_FREE_PAGE is not defined. Does the goal worth it?
If yes, then why? _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
