On Wed, 13 Feb 2008, Paul Jackson wrote:So let's say, like my first example from the previous email, that you have MPOL_INTERLEAVE | MPOL_F_RELATIVE_NODES over nodes 3-4 and your cpuset's mems is only nodes 5-7. This would interleave over no nodes. Correct? It seems like MPOL_F_RELATIVE_NODES is primarily designed to maintain a certain order among the nodes it effects the mempolicy over. It comes with the premise that the task doesn't already know it's cpuset mems (otherwise, the current implementation without MPOL_F_STATIC_NODES would work fine for this) so it doesn't really care what nodes it allocates pages on, it just cares about the order. This works for MPOL_PREFERRED and MPOL_BIND as well, right? I don't understand the use case for this (at all), but if you have workloads that require this type of setting then I can implement this as part of my series. I just want to confirm that there are real world cases backing this so that we don't have flags with highly highly specialized cornercases. [ If a user _does_ specify MPOL_F_STATIC_NODES | MPOL_F_RELATIVE_NODES as part of their syscall, then we'll simply return -EINVAL. ] Well, there's advantages and disadvantages to either approach. My preference (both mode and flags stored in the same member of struct mempolicy): Advantages: - completely consistent with the userspace API of passing modes and flags together in a pointer to an int, and - does not require additional formals to be added to several functions, including functions outside mm/mempolicy.c. Disadvantage: - use of mpol_mode() throughout mm/mempolicy.c code to mask off optional mode flags for conditionals or switch statements. Your preference (separate mode and flags members in struct mempolicy): Advantages: - clearer implementation when dealing with modes: all existing statements involving pol->policy can remain unchanged. Disadvantages: - requires additional formals to be added to several functions, including functions outside mm/mempolicy.c, and - takes additional space in struct mempolicy (two bytes) which could eventually be used for something else. In both cases the testing of mode flags is the same as before: if (pol->policy & MPOL_F_STATIC_NODES) { ... } --
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| David Chinner | Re: [RFD] BIO_RW_BARRIER - what it means for devices, filesystems, and dm/md. |
| Andrew Morton | -mm merge plans for 2.6.23 |
| Trent Piepho | Re: [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
git: | |
| David Miller | Re: iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49 |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
