diff options
author | Hugh Dickins <hugh@veritas.com> | 2006-02-21 18:49:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-21 20:10:15 -0500 |
commit | b00dc3ad74fdb676552d46ee573b88e927240d0c (patch) | |
tree | 6dcf7806f1f0fc791d3455dcf233a11088b18b3a /Documentation/filesystems | |
parent | 808c783e9bfb217a90be5a996a867c41a69b40bd (diff) |
[PATCH] tmpfs: fix mount mpol nodelist parsing
I've been dissatisfied with the mpol_nodelist mount option which was
added to tmpfs earlier in -rc. Replace it by mpol=policy:nodelist.
And it was broken: a nodelist is a comma-separated list of numbers and
ranges; the mount options are a comma-separated list of token=values.
Whoops, blindly strsep'ing on commas doesn't work so well: since we've
no numeric tokens, and unlikely to add them, use that to distinguish.
Move the mpol= parsing to shmem_parse_mpol under CONFIG_NUMA, reject
all its options as invalid if not NUMA. /proc shows MPOL_PREFERRED
as "prefer", so use that name for the policy instead of "preferred".
Enforce that mpol=default has no nodelist; that mpol=prefer has one
node only; that mpol=bind has a nodelist; but let mpol=interleave use
node_online_map if no nodelist given. Describe this in tmpfs.txt.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Robin Holt <holt@sgi.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/tmpfs.txt | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt index dbe4d87d2615..8a155418c705 100644 --- a/Documentation/filesystems/tmpfs.txt +++ b/Documentation/filesystems/tmpfs.txt | |||
@@ -79,15 +79,18 @@ that instance in a system with many cpus making intensive use of it. | |||
79 | 79 | ||
80 | 80 | ||
81 | tmpfs has a mount option to set the NUMA memory allocation policy for | 81 | tmpfs has a mount option to set the NUMA memory allocation policy for |
82 | all files in that instance: | 82 | all files in that instance (if CONFIG_NUMA is enabled) - which can be |
83 | mpol=interleave prefers to allocate memory from each node in turn | 83 | adjusted on the fly via 'mount -o remount ...' |
84 | mpol=default prefers to allocate memory from the local node | ||
85 | mpol=bind prefers to allocate from mpol_nodelist | ||
86 | mpol=preferred prefers to allocate from first node in mpol_nodelist | ||
87 | 84 | ||
88 | The following mount option is used in conjunction with mpol=interleave, | 85 | mpol=default prefers to allocate memory from the local node |
89 | mpol=bind or mpol=preferred: | 86 | mpol=prefer:Node prefers to allocate memory from the given Node |
90 | mpol_nodelist: nodelist suitable for parsing with nodelist_parse. | 87 | mpol=bind:NodeList allocates memory only from nodes in NodeList |
88 | mpol=interleave prefers to allocate from each node in turn | ||
89 | mpol=interleave:NodeList allocates from each node of NodeList in turn | ||
90 | |||
91 | NodeList format is a comma-separated list of decimal numbers and ranges, | ||
92 | a range being two hyphen-separated decimal numbers, the smallest and | ||
93 | largest node numbers in the range. For example, mpol=bind:0-3,5,7,9-15 | ||
91 | 94 | ||
92 | 95 | ||
93 | To specify the initial root directory you can use the following mount | 96 | To specify the initial root directory you can use the following mount |
@@ -109,4 +112,4 @@ RAM/SWAP in 10240 inodes and it is only accessible by root. | |||
109 | Author: | 112 | Author: |
110 | Christoph Rohland <cr@sap.com>, 1.12.01 | 113 | Christoph Rohland <cr@sap.com>, 1.12.01 |
111 | Updated: | 114 | Updated: |
112 | Hugh Dickins <hugh@veritas.com>, 13 March 2005 | 115 | Hugh Dickins <hugh@veritas.com>, 19 February 2006 |