lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 22 Aug 2012 16:58:53 +0200 From: Andrea Arcangeli <aarcange@...hat.com> To: linux-kernel@...r.kernel.org, linux-mm@...ck.org Cc: Hillf Danton <dhillf@...il.com>, Dan Smith <danms@...ibm.com>, Linus Torvalds <torvalds@...ux-foundation.org>, Andrew Morton <akpm@...ux-foundation.org>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>, Paul Turner <pjt@...gle.com>, Suresh Siddha <suresh.b.siddha@...el.com>, Mike Galbraith <efault@....de>, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>, Lai Jiangshan <laijs@...fujitsu.com>, Bharata B Rao <bharata.rao@...il.com>, Lee Schermerhorn <Lee.Schermerhorn@...com>, Rik van Riel <riel@...hat.com>, Johannes Weiner <hannes@...xchg.org>, Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>, Christoph Lameter <cl@...ux.com>, Alex Shi <alex.shi@...el.com>, Mauricio Faria de Oliveira <mauricfo@...ux.vnet.ibm.com>, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>, Don Morris <don.morris@...com>, Benjamin Herrenschmidt <benh@...nel.crashing.org> Subject: [PATCH 09/36] autonuma: core autonuma.h header Header that defines the generic AutoNUMA specific functions. All functions are defined unconditionally, but are only linked into the kernel if CONFIG_AUTONUMA=y. When CONFIG_AUTONUMA=n, their call sites are optimized away at build time (or the kernel wouldn't link). Signed-off-by: Andrea Arcangeli <aarcange@...hat.com> --- include/linux/autonuma.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 include/linux/autonuma.h diff --git a/include/linux/autonuma.h b/include/linux/autonuma.h new file mode 100644 index 0000000..85ca5eb --- /dev/null +++ b/include/linux/autonuma.h @@ -0,0 +1,41 @@ +#ifndef _LINUX_AUTONUMA_H +#define _LINUX_AUTONUMA_H + +#ifdef CONFIG_AUTONUMA + +#include <linux/autonuma_flags.h> + +extern void autonuma_enter(struct mm_struct *mm); +extern void autonuma_exit(struct mm_struct *mm); +extern void __autonuma_migrate_page_remove(struct page *page); +extern void autonuma_migrate_split_huge_page(struct page *page, + struct page *page_tail); +extern void autonuma_setup_new_exec(struct task_struct *p); + +static inline void autonuma_migrate_page_remove(struct page *page) +{ + if (ACCESS_ONCE(page->autonuma_migrate_nid) >= 0) + __autonuma_migrate_page_remove(page); +} + +#define autonuma_printk(format, args...) \ + if (autonuma_debug()) printk(format, ##args) + +#else /* CONFIG_AUTONUMA */ + +static inline void autonuma_enter(struct mm_struct *mm) {} +static inline void autonuma_exit(struct mm_struct *mm) {} +static inline void autonuma_migrate_page_remove(struct page *page) {} +static inline void autonuma_migrate_split_huge_page(struct page *page, + struct page *page_tail) {} +static inline void autonuma_setup_new_exec(struct task_struct *p) {} + +#endif /* CONFIG_AUTONUMA */ + +extern pte_t __pte_numa_fixup(struct mm_struct *mm, struct vm_area_struct *vma, + unsigned long addr, pte_t pte, pte_t *ptep); +extern void __pmd_numa_fixup(struct mm_struct *mm, unsigned long addr, + pmd_t *pmd); +extern void numa_hinting_fault(struct page *page, int numpages); + +#endif /* _LINUX_AUTONUMA_H */ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists