Release 4.7 include/linux/cpuset.h
#ifndef _LINUX_CPUSET_H
#define _LINUX_CPUSET_H
/*
* cpuset interface
*
* Copyright (C) 2003 BULL SA
* Copyright (C) 2004-2006 Silicon Graphics, Inc.
*
*/
#include <linux/sched.h>
#include <linux/cpumask.h>
#include <linux/nodemask.h>
#include <linux/mm.h>
#include <linux/jump_label.h>
#ifdef CONFIG_CPUSETS
extern struct static_key_false cpusets_enabled_key;
static inline bool cpusets_enabled(void)
{
return static_branch_unlikely(&cpusets_enabled_key);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mel gorman | mel gorman | 15 | 93.75% | 1 | 50.00% |
vlastimil babka | vlastimil babka | 1 | 6.25% | 1 | 50.00% |
| Total | 16 | 100.00% | 2 | 100.00% |
static inline int nr_cpusets(void)
{
/* jump label reference count + the top-level cpuset */
return static_key_count(&cpusets_enabled_key.key) + 1;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mel gorman | mel gorman | 19 | 90.48% | 1 | 50.00% |
vlastimil babka | vlastimil babka | 2 | 9.52% | 1 | 50.00% |
| Total | 21 | 100.00% | 2 | 100.00% |
static inline void cpuset_inc(void)
{
static_branch_inc(&cpusets_enabled_key);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mel gorman | mel gorman | 14 | 93.33% | 1 | 50.00% |
vlastimil babka | vlastimil babka | 1 | 6.67% | 1 | 50.00% |
| Total | 15 | 100.00% | 2 | 100.00% |
static inline void cpuset_dec(void)
{
static_branch_dec(&cpusets_enabled_key);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mel gorman | mel gorman | 14 | 93.33% | 1 | 50.00% |
vlastimil babka | vlastimil babka | 1 | 6.67% | 1 | 50.00% |
| Total | 15 | 100.00% | 2 | 100.00% |
extern int cpuset_init(void);
extern void cpuset_init_smp(void);
extern void cpuset_update_active_cpus(bool cpu_online);
extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask);
extern void cpuset_cpus_allowed_fallback(struct task_struct *p);
extern nodemask_t cpuset_mems_allowed(struct task_struct *p);
#define cpuset_current_mems_allowed (current->mems_allowed)
void cpuset_init_current_mems_allowed(void);
int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask);
extern bool __cpuset_node_allowed(int node, gfp_t gfp_mask);
static inline bool cpuset_node_allowed(int node, gfp_t gfp_mask)
{
if (cpusets_enabled())
return __cpuset_node_allowed(node, gfp_mask);
return true;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david rientjes | david rientjes | 15 | 51.72% | 1 | 20.00% |
vlastimil babka | vlastimil babka | 9 | 31.03% | 1 | 20.00% |
paul jackson | paul jackson | 2 | 6.90% | 1 | 20.00% |
vladimir davydov | vladimir davydov | 2 | 6.90% | 1 | 20.00% |
mel gorman | mel gorman | 1 | 3.45% | 1 | 20.00% |
| Total | 29 | 100.00% | 5 | 100.00% |
static inline bool __cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
{
return __cpuset_node_allowed(zone_to_nid(z), gfp_mask);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 20 | 76.92% | 1 | 33.33% |
david rientjes | david rientjes | 3 | 11.54% | 1 | 33.33% |
vlastimil babka | vlastimil babka | 3 | 11.54% | 1 | 33.33% |
| Total | 26 | 100.00% | 3 | 100.00% |
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;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
vlastimil babka | vlastimil babka | 31 | 100.00% | 1 | 100.00% |
| Total | 31 | 100.00% | 1 | 100.00% |
extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1,
const struct task_struct *tsk2);
#define cpuset_memory_pressure_bump() \
do { \
if (cpuset_memory_pressure_enabled) \
__cpuset_memory_pressure_bump(); \
} while (0)
extern int cpuset_memory_pressure_enabled;
extern void __cpuset_memory_pressure_bump(void);
extern void cpuset_task_status_allowed(struct seq_file *m,
struct task_struct *task);
extern int proc_cpuset_show(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *tsk);
extern int cpuset_mem_spread_node(void);
extern int cpuset_slab_spread_node(void);
static inline int cpuset_do_page_mem_spread(void)
{
return task_spread_page(current);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 12 | 80.00% | 1 | 50.00% |
li zefan | li zefan | 3 | 20.00% | 1 | 50.00% |
| Total | 15 | 100.00% | 2 | 100.00% |
static inline int cpuset_do_slab_mem_spread(void)
{
return task_spread_slab(current);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 12 | 80.00% | 1 | 50.00% |
li zefan | li zefan | 3 | 20.00% | 1 | 50.00% |
| Total | 15 | 100.00% | 2 | 100.00% |
extern int current_cpuset_is_being_rebound(void);
extern void rebuild_sched_domains(void);
extern void cpuset_print_current_mems_allowed(void);
/*
* read_mems_allowed_begin is required when making decisions involving
* mems_allowed such as during page allocation. mems_allowed can be updated in
* parallel and depending on the new value an operation can fail potentially
* causing process failure. A retry loop with read_mems_allowed_begin and
* read_mems_allowed_retry prevents these artificial failures.
*/
static inline unsigned int read_mems_allowed_begin(void)
{
if (!cpusets_enabled())
return 0;
return read_seqcount_begin(¤t->mems_allowed_seq);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mel gorman | mel gorman | 19 | 67.86% | 3 | 75.00% |
miao xie | miao xie | 9 | 32.14% | 1 | 25.00% |
| Total | 28 | 100.00% | 4 | 100.00% |
/*
* If this returns true, the operation that took place after
* read_mems_allowed_begin may have failed artificially due to a concurrent
* update of mems_allowed. It is up to the caller to retry the operation if
* appropriate.
*/
static inline bool read_mems_allowed_retry(unsigned int seq)
{
if (!cpusets_enabled())
return false;
return read_seqcount_retry(¤t->mems_allowed_seq, seq);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mel gorman | mel gorman | 21 | 67.74% | 3 | 75.00% |
miao xie | miao xie | 10 | 32.26% | 1 | 25.00% |
| Total | 31 | 100.00% | 4 | 100.00% |
static inline void set_mems_allowed(nodemask_t nodemask)
{
unsigned long flags;
task_lock(current);
local_irq_save(flags);
write_seqcount_begin(¤t->mems_allowed_seq);
current->mems_allowed = nodemask;
write_seqcount_end(¤t->mems_allowed_seq);
local_irq_restore(flags);
task_unlock(current);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
miao xie | miao xie | 20 | 35.71% | 2 | 40.00% |
mel gorman | mel gorman | 16 | 28.57% | 1 | 20.00% |
john stultz | john stultz | 14 | 25.00% | 1 | 20.00% |
paul jackson | paul jackson | 6 | 10.71% | 1 | 20.00% |
| Total | 56 | 100.00% | 5 | 100.00% |
#else /* !CONFIG_CPUSETS */
static inline bool cpusets_enabled(void) { return false; }
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mel gorman | mel gorman | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline int cpuset_init(void) { return 0; }
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline void cpuset_init_smp(void) {}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 8 | 100.00% | 1 | 100.00% |
| Total | 8 | 100.00% | 1 | 100.00% |
static inline void cpuset_update_active_cpus(bool cpu_online)
{
partition_sched_domains(1, NULL, NULL);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
tejun heo | tejun heo | 17 | 89.47% | 1 | 50.00% |
srivatsa s. bhat | srivatsa s. bhat | 2 | 10.53% | 1 | 50.00% |
| Total | 19 | 100.00% | 2 | 100.00% |
static inline void cpuset_cpus_allowed(struct task_struct *p,
struct cpumask *mask)
{
cpumask_copy(mask, cpu_possible_mask);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 11 | 45.83% | 1 | 25.00% |
mike travis | mike travis | 6 | 25.00% | 1 | 25.00% |
rusty russell | rusty russell | 5 | 20.83% | 1 | 25.00% |
li zefan | li zefan | 2 | 8.33% | 1 | 25.00% |
| Total | 24 | 100.00% | 4 | 100.00% |
static inline void cpuset_cpus_allowed_fallback(struct task_struct *p)
{
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
oleg nesterov | oleg nesterov | 9 | 81.82% | 1 | 50.00% |
peter zijlstra | peter zijlstra | 2 | 18.18% | 1 | 50.00% |
| Total | 11 | 100.00% | 2 | 100.00% |
static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
{
return node_possible_map;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 15 | 100.00% | 1 | 100.00% |
| Total | 15 | 100.00% | 1 | 100.00% |
#define cpuset_current_mems_allowed (node_states[N_MEMORY])
static inline void cpuset_init_current_mems_allowed(void) {}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 8 | 100.00% | 1 | 100.00% |
| Total | 8 | 100.00% | 1 | 100.00% |
static inline int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask)
{
return 1;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 11 | 78.57% | 1 | 50.00% |
mel gorman | mel gorman | 3 | 21.43% | 1 | 50.00% |
| Total | 14 | 100.00% | 2 | 100.00% |
static inline bool cpuset_node_allowed(int node, gfp_t gfp_mask)
{
return true;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david rientjes | david rientjes | 11 | 68.75% | 1 | 33.33% |
vlastimil babka | vlastimil babka | 4 | 25.00% | 1 | 33.33% |
vladimir davydov | vladimir davydov | 1 | 6.25% | 1 | 33.33% |
| Total | 16 | 100.00% | 3 | 100.00% |
static inline bool __cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
{
return true;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
vlastimil babka | vlastimil babka | 16 | 88.89% | 1 | 50.00% |
david rientjes | david rientjes | 2 | 11.11% | 1 | 50.00% |
| Total | 18 | 100.00% | 2 | 100.00% |
static inline bool cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
{
return true;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 14 | 77.78% | 2 | 40.00% |
vlastimil babka | vlastimil babka | 2 | 11.11% | 1 | 20.00% |
vladimir davydov | vladimir davydov | 1 | 5.56% | 1 | 20.00% |
al viro | al viro | 1 | 5.56% | 1 | 20.00% |
| Total | 18 | 100.00% | 5 | 100.00% |
static inline int cpuset_mems_allowed_intersects(const struct task_struct *tsk1,
const struct task_struct *tsk2)
{
return 1;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 14 | 63.64% | 1 | 50.00% |
david rientjes | david rientjes | 8 | 36.36% | 1 | 50.00% |
| Total | 22 | 100.00% | 2 | 100.00% |
static inline void cpuset_memory_pressure_bump(void) {}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 8 | 100.00% | 1 | 100.00% |
| Total | 8 | 100.00% | 1 | 100.00% |
static inline void cpuset_task_status_allowed(struct seq_file *m,
struct task_struct *task)
{
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 9 | 56.25% | 1 | 50.00% |
eric w. biederman | eric w. biederman | 7 | 43.75% | 1 | 50.00% |
| Total | 16 | 100.00% | 2 | 100.00% |
static inline int cpuset_mem_spread_node(void)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline int cpuset_slab_spread_node(void)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
jack steiner | jack steiner | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline int cpuset_do_page_mem_spread(void)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline int cpuset_do_slab_mem_spread(void)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline int current_cpuset_is_being_rebound(void)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul menage | paul menage | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline void rebuild_sched_domains(void)
{
partition_sched_domains(1, NULL, NULL);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
maksim krasnyanskiy | maksim krasnyanskiy | 18 | 100.00% | 2 | 100.00% |
| Total | 18 | 100.00% | 2 | 100.00% |
static inline void cpuset_print_current_mems_allowed(void)
{
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
david rientjes | david rientjes | 8 | 100.00% | 2 | 100.00% |
| Total | 8 | 100.00% | 2 | 100.00% |
static inline void set_mems_allowed(nodemask_t nodemask)
{
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
miao xie | miao xie | 9 | 100.00% | 1 | 100.00% |
| Total | 9 | 100.00% | 1 | 100.00% |
static inline unsigned int read_mems_allowed_begin(void)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mel gorman | mel gorman | 8 | 61.54% | 2 | 66.67% |
miao xie | miao xie | 5 | 38.46% | 1 | 33.33% |
| Total | 13 | 100.00% | 3 | 100.00% |
static inline bool read_mems_allowed_retry(unsigned int seq)
{
return false;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
mel gorman | mel gorman | 10 | 71.43% | 2 | 66.67% |
miao xie | miao xie | 4 | 28.57% | 1 | 33.33% |
| Total | 14 | 100.00% | 3 | 100.00% |
#endif /* !CONFIG_CPUSETS */
#endif /* _LINUX_CPUSET_H */
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
paul jackson | paul jackson | 325 | 36.89% | 12 | 27.91% |
mel gorman | mel gorman | 162 | 18.39% | 5 | 11.63% |
vlastimil babka | vlastimil babka | 72 | 8.17% | 1 | 2.33% |
david rientjes | david rientjes | 65 | 7.38% | 4 | 9.30% |
miao xie | miao xie | 60 | 6.81% | 2 | 4.65% |
maksim krasnyanskiy | maksim krasnyanskiy | 25 | 2.84% | 2 | 4.65% |
li zefan | li zefan | 24 | 2.72% | 3 | 6.98% |
tejun heo | tejun heo | 23 | 2.61% | 1 | 2.33% |
paul menage | paul menage | 20 | 2.27% | 1 | 2.33% |
jack steiner | jack steiner | 19 | 2.16% | 1 | 2.33% |
oleg nesterov | oleg nesterov | 18 | 2.04% | 1 | 2.33% |
john stultz | john stultz | 14 | 1.59% | 1 | 2.33% |
eric w. biederman | eric w. biederman | 13 | 1.48% | 1 | 2.33% |
al viro | al viro | 13 | 1.48% | 2 | 4.65% |
mike travis | mike travis | 10 | 1.14% | 1 | 2.33% |
rusty russell | rusty russell | 5 | 0.57% | 1 | 2.33% |
vladimir davydov | vladimir davydov | 5 | 0.57% | 1 | 2.33% |
srivatsa s. bhat | srivatsa s. bhat | 4 | 0.45% | 1 | 2.33% |
peter zijlstra | peter zijlstra | 3 | 0.34% | 1 | 2.33% |
lai jiangshan | lai jiangshan | 1 | 0.11% | 1 | 2.33% |
| Total | 881 | 100.00% | 43 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.