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 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git]
/
include
/
linux
/
cpuset.h
diff --git
a/include/linux/cpuset.h
b/include/linux/cpuset.h
index 85a868ccb4931d374a1ee9fb4e4036bb84399561..bfc204e70338ab1eed9016b6183076647149cdbc 100644
(file)
--- a/
include/linux/cpuset.h
+++ b/
include/linux/cpuset.h
@@
-16,26
+16,26
@@
#ifdef CONFIG_CPUSETS
#ifdef CONFIG_CPUSETS
-extern struct static_key cpusets_enabled_key;
+extern struct static_key
_false
cpusets_enabled_key;
static inline bool cpusets_enabled(void)
{
static inline bool cpusets_enabled(void)
{
- return static_
key_false
(&cpusets_enabled_key);
+ return static_
branch_unlikely
(&cpusets_enabled_key);
}
static inline int nr_cpusets(void)
{
/* jump label reference count + the top-level cpuset */
}
static inline int nr_cpusets(void)
{
/* jump label reference count + the top-level cpuset */
- return static_key_count(&cpusets_enabled_key) + 1;
+ return static_key_count(&cpusets_enabled_key
.key
) + 1;
}
static inline void cpuset_inc(void)
{
}
static inline void cpuset_inc(void)
{
- static_
key_slow
_inc(&cpusets_enabled_key);
+ static_
branch
_inc(&cpusets_enabled_key);
}
static inline void cpuset_dec(void)
{
}
static inline void cpuset_dec(void)
{
- static_
key_slow
_dec(&cpusets_enabled_key);
+ static_
branch
_dec(&cpusets_enabled_key);
}
extern int cpuset_init(void);
}
extern int cpuset_init(void);
@@
-48,16
+48,25
@@
extern nodemask_t cpuset_mems_allowed(struct task_struct *p);
void cpuset_init_current_mems_allowed(void);
int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask);
void cpuset_init_current_mems_allowed(void);
int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask);
-extern
int
__cpuset_node_allowed(int node, gfp_t gfp_mask);
+extern
bool
__cpuset_node_allowed(int node, gfp_t gfp_mask);
-static inline
int
cpuset_node_allowed(int node, gfp_t gfp_mask)
+static inline
bool
cpuset_node_allowed(int node, gfp_t gfp_mask)
{
{
- return nr_cpusets() <= 1 || __cpuset_node_allowed(node, gfp_mask);
+ if (cpusets_enabled())
+ return __cpuset_node_allowed(node, gfp_mask);
+ return true;
}
}
-static inline
int
cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
+static inline
bool __
cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
{
{
- return cpuset_node_allowed(zone_to_nid(z), gfp_mask);
+ return __cpuset_node_allowed(zone_to_nid(z), gfp_mask);
+}
+
+static inline bool cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
+{
+ if (cpusets_enabled())
+ return __cpuset_zone_allowed(z, gfp_mask);
+ return true;
}
extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1,
}
extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1,
@@
-172,14
+181,19
@@
static inline int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask)
return 1;
}
return 1;
}
-static inline
int
cpuset_node_allowed(int node, gfp_t gfp_mask)
+static inline
bool
cpuset_node_allowed(int node, gfp_t gfp_mask)
{
{
- return
1
;
+ return
true
;
}
}
-static inline
int
cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
+static inline
bool __
cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
{
{
- return 1;
+ return true;
+}
+
+static inline bool cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
+{
+ return true;
}
static inline int cpuset_mems_allowed_intersects(const struct task_struct *tsk1,
}
static inline int cpuset_mems_allowed_intersects(const struct task_struct *tsk1,
This page took
0.025437 seconds
and
5
git commands to generate.