diff options
author | David Rientjes <rientjes@google.com> | 2015-04-14 18:47:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:49:03 -0400 |
commit | 6e276d2a517fba71a2be2252fdffb237e746e784 (patch) | |
tree | 36e99835635803087a46f8f8b5475c7b69a28d13 /kernel | |
parent | 5265047ac30191ea24b16503165000c225f54feb (diff) |
kernel, cpuset: remove exception for __GFP_THISNODE
Nothing calls __cpuset_node_allowed() with __GFP_THISNODE set anymore, so
remove the obscure comment about it and its special-case exception.
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Pravin Shelar <pshelar@nicira.com>
Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cpuset.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index c68f0721df10..ee14e3a35a29 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -2453,20 +2453,12 @@ static struct cpuset *nearest_hardwall_ancestor(struct cpuset *cs) | |||
2453 | * @node: is this an allowed node? | 2453 | * @node: is this an allowed node? |
2454 | * @gfp_mask: memory allocation flags | 2454 | * @gfp_mask: memory allocation flags |
2455 | * | 2455 | * |
2456 | * If we're in interrupt, yes, we can always allocate. If __GFP_THISNODE is | 2456 | * If we're in interrupt, yes, we can always allocate. If @node is set in |
2457 | * set, yes, we can always allocate. If node is in our task's mems_allowed, | 2457 | * current's mems_allowed, yes. If it's not a __GFP_HARDWALL request and this |
2458 | * yes. If it's not a __GFP_HARDWALL request and this node is in the nearest | 2458 | * node is set in the nearest hardwalled cpuset ancestor to current's cpuset, |
2459 | * hardwalled cpuset ancestor to this task's cpuset, yes. If the task has been | 2459 | * yes. If current has access to memory reserves due to TIF_MEMDIE, yes. |
2460 | * OOM killed and has access to memory reserves as specified by the TIF_MEMDIE | ||
2461 | * flag, yes. | ||
2462 | * Otherwise, no. | 2460 | * Otherwise, no. |
2463 | * | 2461 | * |
2464 | * The __GFP_THISNODE placement logic is really handled elsewhere, | ||
2465 | * by forcibly using a zonelist starting at a specified node, and by | ||
2466 | * (in get_page_from_freelist()) refusing to consider the zones for | ||
2467 | * any node on the zonelist except the first. By the time any such | ||
2468 | * calls get to this routine, we should just shut up and say 'yes'. | ||
2469 | * | ||
2470 | * GFP_USER allocations are marked with the __GFP_HARDWALL bit, | 2462 | * GFP_USER allocations are marked with the __GFP_HARDWALL bit, |
2471 | * and do not allow allocations outside the current tasks cpuset | 2463 | * and do not allow allocations outside the current tasks cpuset |
2472 | * unless the task has been OOM killed as is marked TIF_MEMDIE. | 2464 | * unless the task has been OOM killed as is marked TIF_MEMDIE. |
@@ -2502,7 +2494,7 @@ int __cpuset_node_allowed(int node, gfp_t gfp_mask) | |||
2502 | int allowed; /* is allocation in zone z allowed? */ | 2494 | int allowed; /* is allocation in zone z allowed? */ |
2503 | unsigned long flags; | 2495 | unsigned long flags; |
2504 | 2496 | ||
2505 | if (in_interrupt() || (gfp_mask & __GFP_THISNODE)) | 2497 | if (in_interrupt()) |
2506 | return 1; | 2498 | return 1; |
2507 | if (node_isset(node, current->mems_allowed)) | 2499 | if (node_isset(node, current->mems_allowed)) |
2508 | return 1; | 2500 | return 1; |