projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'acpi-ec'
[deliverable/linux.git]
/
kernel
/
cpuset.c
diff --git
a/kernel/cpuset.c
b/kernel/cpuset.c
index 1902956baba1fa19d915c2ccad402a64209b4860..73e93e53884d1098ceec4b3c8d31049c8d9fc70b 100644
(file)
--- a/
kernel/cpuset.c
+++ b/
kernel/cpuset.c
@@
-61,7
+61,7
@@
#include <linux/cgroup.h>
#include <linux/wait.h>
#include <linux/cgroup.h>
#include <linux/wait.h>
-
struct static_key cpusets_enabled_key __read_mostly = STATIC_KEY_INIT_FALSE
;
+
DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key)
;
/* See "Frequency meter" comments, below. */
/* See "Frequency meter" comments, below. */
@@
-2528,27
+2528,27
@@
static struct cpuset *nearest_hardwall_ancestor(struct cpuset *cs)
* GFP_KERNEL - any node in enclosing hardwalled cpuset ok
* GFP_USER - only nodes in current tasks mems allowed ok.
*/
* GFP_KERNEL - any node in enclosing hardwalled cpuset ok
* GFP_USER - only nodes in current tasks mems allowed ok.
*/
-
int
__cpuset_node_allowed(int node, gfp_t gfp_mask)
+
bool
__cpuset_node_allowed(int node, gfp_t gfp_mask)
{
struct cpuset *cs; /* current cpuset ancestors */
int allowed; /* is allocation in zone z allowed? */
unsigned long flags;
if (in_interrupt())
{
struct cpuset *cs; /* current cpuset ancestors */
int allowed; /* is allocation in zone z allowed? */
unsigned long flags;
if (in_interrupt())
- return
1
;
+ return
true
;
if (node_isset(node, current->mems_allowed))
if (node_isset(node, current->mems_allowed))
- return
1
;
+ return
true
;
/*
* Allow tasks that have access to memory reserves because they have
* been OOM killed to get memory anywhere.
*/
if (unlikely(test_thread_flag(TIF_MEMDIE)))
/*
* Allow tasks that have access to memory reserves because they have
* been OOM killed to get memory anywhere.
*/
if (unlikely(test_thread_flag(TIF_MEMDIE)))
- return
1
;
+ return
true
;
if (gfp_mask & __GFP_HARDWALL) /* If hardwall request, stop here */
if (gfp_mask & __GFP_HARDWALL) /* If hardwall request, stop here */
- return
0
;
+ return
false
;
if (current->flags & PF_EXITING) /* Let dying task have memory */
if (current->flags & PF_EXITING) /* Let dying task have memory */
- return
1
;
+ return
true
;
/* Not hardwall and node outside mems_allowed: scan up cpusets */
spin_lock_irqsave(&callback_lock, flags);
/* Not hardwall and node outside mems_allowed: scan up cpusets */
spin_lock_irqsave(&callback_lock, flags);
@@
-2591,13
+2591,7
@@
int __cpuset_node_allowed(int node, gfp_t gfp_mask)
static int cpuset_spread_node(int *rotor)
{
static int cpuset_spread_node(int *rotor)
{
- int node;
-
- node = next_node(*rotor, current->mems_allowed);
- if (node == MAX_NUMNODES)
- node = first_node(current->mems_allowed);
- *rotor = node;
- return node;
+ return *rotor = next_node_in(*rotor, current->mems_allowed);
}
int cpuset_mem_spread_node(void)
}
int cpuset_mem_spread_node(void)
This page took
0.03865 seconds
and
5
git commands to generate.