• David Rientjes's avatar
    mempolicy: create mempolicy_operations structure · 37012946
    David Rientjes authored
    Create a mempolicy_operations structure that currently points to two
    functions[*] for the various modes:
    
    	int (*create)(struct mempolicy *, const nodemask_t *);
    	void (*rebind)(struct mempolicy *, const nodemask_t *);
    
    This splits the implementation for the various modes out of two large
    functions, mpol_new() and mpol_rebind_policy().  Eventually it may be
    beneficial to add additional functions to accomodate the existing switch()
    statements in mm/mempolicy.c.
    
     [*] The ->create() function for MPOL_DEFAULT is currently NULL since no
         struct mempolicy is dynamically allocated.
    
    [Lee.Schermerhorn@hp.com: fix regression in the package mempolicy regression tests]
    Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
    Cc: Paul Jackson <pj@sgi.com>
    Cc: Christoph Lameter <clameter@sgi.com>
    Cc: Andi Kleen <ak@suse.de>
    Signed-off-by: default avatarLee Schermerhorn <lee.schermerhorn@hp.com>
    Cc: Eric Whitney <eric.whitney@hp.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    37012946
mempolicy.c 53.8 KB