Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350339
b: refs/heads/master
c: efeb77b
h: refs/heads/master
i:
  350337: 07b9150
  350335: 1f00c46
v: v3
  • Loading branch information
Tejun Heo committed Jan 7, 2013
1 parent c164922 commit c428a0d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c8f699bb56aeae951e02fe2a46c9ada022535770
refs/heads/master: efeb77b2f13deb0503e65ad2b243495b6de75173
11 changes: 10 additions & 1 deletion trunk/kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ static inline bool task_has_mempolicy(struct task_struct *task)

/* bits in struct cpuset flags field */
typedef enum {
CS_ONLINE,
CS_CPU_EXCLUSIVE,
CS_MEM_EXCLUSIVE,
CS_MEM_HARDWALL,
Expand All @@ -154,6 +155,11 @@ enum hotplug_event {
};

/* convenient tests for these bits */
static inline bool is_cpuset_online(const struct cpuset *cs)
{
return test_bit(CS_ONLINE, &cs->flags);
}

static inline int is_cpu_exclusive(const struct cpuset *cs)
{
return test_bit(CS_CPU_EXCLUSIVE, &cs->flags);
Expand Down Expand Up @@ -190,7 +196,8 @@ static inline int is_spread_slab(const struct cpuset *cs)
}

static struct cpuset top_cpuset = {
.flags = ((1 << CS_CPU_EXCLUSIVE) | (1 << CS_MEM_EXCLUSIVE)),
.flags = ((1 << CS_ONLINE) | (1 << CS_CPU_EXCLUSIVE) |
(1 << CS_MEM_EXCLUSIVE)),
};

/*
Expand Down Expand Up @@ -1822,6 +1829,7 @@ static int cpuset_css_online(struct cgroup *cgrp)
if (!parent)
return 0;

set_bit(CS_ONLINE, &cs->flags);
if (is_spread_page(parent))
set_bit(CS_SPREAD_PAGE, &cs->flags);
if (is_spread_slab(parent))
Expand Down Expand Up @@ -1871,6 +1879,7 @@ static void cpuset_css_offline(struct cgroup *cgrp)
update_flag(CS_SCHED_LOAD_BALANCE, cs, 0);

number_of_cpusets--;
clear_bit(CS_ONLINE, &cs->flags);

cgroup_unlock();
}
Expand Down

0 comments on commit c428a0d

Please sign in to comment.