small numa api fixups
Subsystems (8)
PATCH 1/1 small numa api fixups
fs/exec.c +1 -0
@@ -46,6 +46,7 @@#include <linux/security.h> #include <linux/syscalls.h> #include <linux/rmap.h> +#include <linux/mempolicy.h> #include <asm/uaccess.h> #include <asm/mmu_context.h>
include/linux/mm.h +2 -1
@@ -13,7 +13,8 @@#include <linux/rbtree.h> #include <linux/prio_tree.h> #include <linux/fs.h> -#include <linux/mempolicy.h> + +struct mempolicy ;#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ extern unsigned long max_mapnr;
include/linux/sched.h +3 -1
@@ -29,7 +29,6 @@#include <linux/completion.h> #include <linux/pid.h> #include <linux/percpu.h> -#include <linux/mempolicy.h> struct exec_domain ;
@@ -388,6 +387,7 @@ int set_current_groups(struct group_infostruct audit_context ;/* See audit.c */ +struct mempolicy ;struct task_struct {volatile long state;/* -1 unrunnable, 0 runnable, >0 stopped */
@@ -517,8 +517,10 @@ struct task_struct {unsigned long ptrace_message;siginfo_t *last_siginfo;/* For ptrace use. */ +#ifdef CONFIG_NUMA struct mempolicy *mempolicy;short il_next;/* could be shared with used_math */ +#endif };static inline pid_t process_group (struct task_struct *tsk)
kernel/exit.c +2 -0
@@ -790,7 +790,9 @@ asmlinkage NORET_TYPE void do_exit(long__exit_fs (tsk);exit_namespace (tsk);exit_thread (); +#ifdef CONFIG_NUMA mpol_free (tsk->mempolicy); +#endif if (tsk->signal->leader)disassociate_ctty (1 );
kernel/fork.c +5 -0
@@ -35,6 +35,7 @@#include <linux/audit.h> #include <linux/rmap.h> #include <linux/cpu.h> +#include <linux/mempolicy.h> #include <asm/pgtable.h> #include <asm/pgalloc.h>
@@ -972,12 +973,14 @@ struct task_struct *copy_process(unsigne p->security =NULL ; p->io_context =NULL ; p->audit_context =NULL ; +#ifdef CONFIG_NUMA p->mempolicy =mpol_copy (p->mempolicy);if (IS_ERR (p->mempolicy)) { retval =PTR_ERR (p->mempolicy); p->mempolicy =NULL ; goto bad_fork_cleanup; } +#endif retval = -ENOMEM ;if ((retval =security_task_alloc (p)))
@@ -1128,7 +1131,9 @@ bad_fork_cleanup_audit: bad_fork_cleanup_security:security_task_free (p); bad_fork_cleanup_policy: +#ifdef CONFIG_NUMA mpol_free (p->mempolicy); +#endif bad_fork_cleanup:if (p->pid >0 )free_pidmap (p->pid);
mm/mempolicy.c +1 -0
@@ -72,6 +72,7 @@#include <linux/interrupt.h> #include <linux/init.h> #include <linux/compat.h> +#include <linux/mempolicy.h> #include <asm/uaccess.h> static kmem_cache_t *policy_cache;
mm/mmap.c +1 -0
@@ -21,6 +21,7 @@#include <linux/profile.h> #include <linux/module.h> #include <linux/mount.h> +#include <linux/mempolicy.h> #include <asm/uaccess.h> #include <asm/tlb.h>
mm/mprotect.c +1 -0
@@ -16,6 +16,7 @@#include <linux/fs.h> #include <linux/highmem.h> #include <linux/security.h> +#include <linux/mempolicy.h> #include <asm/uaccess.h> #include <asm/pgtable.h>
mm/shmem.c +1 -0
@@ -39,6 +39,7 @@#include <linux/blkdev.h> #include <linux/security.h> #include <linux/swapops.h> +#include <linux/mempolicy.h> #include <asm/uaccess.h> #include <asm/div64.h> #include <asm/pgtable.h>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>