mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 21:31:51 +00:00
cpusets: replace zone allowed functions with node allowed
The cpuset_zone_allowed() variants are actually only a function of the zone's node. Cc: Paul Menage <menage@google.com> Acked-by: Christoph Lameter <cl@linux-foundation.org> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David Rientjes <rientjes@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7f81b1ae18
commit
a1bc5a4eee
2 changed files with 52 additions and 40 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <linux/cpumask.h>
|
||||
#include <linux/nodemask.h>
|
||||
#include <linux/cgroup.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
#ifdef CONFIG_CPUSETS
|
||||
|
||||
|
@ -29,19 +30,29 @@ void cpuset_init_current_mems_allowed(void);
|
|||
void cpuset_update_task_memory_state(void);
|
||||
int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask);
|
||||
|
||||
extern int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask);
|
||||
extern int __cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask);
|
||||
extern int __cpuset_node_allowed_softwall(int node, gfp_t gfp_mask);
|
||||
extern int __cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask);
|
||||
|
||||
static int inline cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask)
|
||||
static inline int cpuset_node_allowed_softwall(int node, gfp_t gfp_mask)
|
||||
{
|
||||
return number_of_cpusets <= 1 ||
|
||||
__cpuset_zone_allowed_softwall(z, gfp_mask);
|
||||
__cpuset_node_allowed_softwall(node, gfp_mask);
|
||||
}
|
||||
|
||||
static int inline cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask)
|
||||
static inline int cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask)
|
||||
{
|
||||
return number_of_cpusets <= 1 ||
|
||||
__cpuset_zone_allowed_hardwall(z, gfp_mask);
|
||||
__cpuset_node_allowed_hardwall(node, gfp_mask);
|
||||
}
|
||||
|
||||
static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask)
|
||||
{
|
||||
return cpuset_node_allowed_softwall(zone_to_nid(z), gfp_mask);
|
||||
}
|
||||
|
||||
static inline int cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask)
|
||||
{
|
||||
return cpuset_node_allowed_hardwall(zone_to_nid(z), gfp_mask);
|
||||
}
|
||||
|
||||
extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1,
|
||||
|
@ -112,6 +123,16 @@ static inline int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static inline int cpuset_node_allowed_softwall(int node, gfp_t gfp_mask)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask)
|
||||
{
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue