aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLee Schermerhorn <lee.schermerhorn@hp.com>2008-04-28 05:13:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:24 -0400
commit45c4745af381851b0406d8e4db99e62e265691c2 (patch)
treed93f6f7b3d7eb3773aaa80444c56baff99e670d6 /include
parentae4d8c16aa22775f5731677abb8a82f03cec877e (diff)
mempolicy: rename struct mempolicy 'policy' member to 'mode'
The terms 'policy' and 'mode' are both used in various places to describe the semantics of the value stored in the 'policy' member of struct mempolicy. Furthermore, the term 'policy' is used to refer to that member, to the entire struct mempolicy and to the more abstract concept of the tuple consisting of a "mode" and an optional node or set of nodes. Recently, we have added "mode flags" that are passed in the upper bits of the 'mode' [or sometimes, 'policy'] member of the numa APIs. I'd like to resolve this confusion, which perhaps only exists in my mind, by renaming the 'policy' member to 'mode' throughout, and fixing up the Documentation. Man pages will be updated separately. Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Christoph Lameter <clameter@sgi.com> Cc: David Rientjes <rientjes@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mempolicy.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 5e19c2275a6f..9080fab1426d 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -80,7 +80,7 @@ struct mm_struct;
80 */ 80 */
81struct mempolicy { 81struct mempolicy {
82 atomic_t refcnt; 82 atomic_t refcnt;
83 unsigned short policy; /* See MPOL_* above */ 83 unsigned short mode; /* See MPOL_* above */
84 unsigned short flags; /* See set_mempolicy() MPOL_F_* above */ 84 unsigned short flags; /* See set_mempolicy() MPOL_F_* above */
85 union { 85 union {
86 short preferred_node; /* preferred */ 86 short preferred_node; /* preferred */
@@ -149,7 +149,7 @@ struct shared_policy {
149 spinlock_t lock; 149 spinlock_t lock;
150}; 150};
151 151
152void mpol_shared_policy_init(struct shared_policy *info, unsigned short policy, 152void mpol_shared_policy_init(struct shared_policy *info, unsigned short mode,
153 unsigned short flags, nodemask_t *nodes); 153 unsigned short flags, nodemask_t *nodes);
154int mpol_set_shared_policy(struct shared_policy *info, 154int mpol_set_shared_policy(struct shared_policy *info,
155 struct vm_area_struct *vma, 155 struct vm_area_struct *vma,
@@ -213,7 +213,7 @@ static inline int mpol_set_shared_policy(struct shared_policy *info,
213} 213}
214 214
215static inline void mpol_shared_policy_init(struct shared_policy *info, 215static inline void mpol_shared_policy_init(struct shared_policy *info,
216 unsigned short policy, unsigned short flags, nodemask_t *nodes) 216 unsigned short mode, unsigned short flags, nodemask_t *nodes)
217{ 217{
218} 218}
219 219