On Mon, 11 Feb 2008, Christoph Lameter wrote:Mempolicy flags, as I implemented them in patch 2 in this series, are not integer constants that are enumerated starting at 0. They are individual bits that are shifted a pre-defined length and intersected with the enumerated mode. This allows both the mode and the flags to be stored in the same object. Just because enum mempolicy_mode is the equivalent of passing an int in C is irrelevant; its semantics are that the value is coming from enum mempolicy_mode. That includes _only_ the mode itself: enum mempolicy_mode { MPOL_DEFAULT, MPOL_BIND, MPOL_PREFERRED, MPOL_INTERLEAVE, MPOL_MAX, }; And changing the policy member of struct mempolicy to 'enum mempolicy_mode' instead of 'unsigned short' would increase its size. Not that it matters, since in the third patch I add a whole nodemask_t, but it's simply unnecessary. Right now we have the capacity to store 256 individual mempolicy modes (we currently use four) and eight mempolicy flags with unsigned short. David --
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Adrian Bunk | Re: LSM conversion to static interface |
git: | |
| Gerrit Renker | [PATCH 26/37] dccp: Integration of dynamic feature activation - part 1 (socket set... |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
| Linus Torvalds | Re: [GIT]: Networking |
