Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121347
b: refs/heads/master
c: e9515c3
h: refs/heads/master
i:
  121345: 475c3ba
  121343: 57a60d0
v: v3
  • Loading branch information
Ken Chen authored and Ingo Molnar committed Dec 16, 2008
1 parent d1b56f9 commit e6bdf25
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 720f54988e17b33f3f477010b3a68ee872d20d5a
refs/heads/master: e9515c3c9feecd74174c2998add0db51e02abb8d
20 changes: 20 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -9342,12 +9342,32 @@ static int cpuusage_write(struct cgroup *cgrp, struct cftype *cftype,
return err;
}

static int cpuacct_percpu_seq_read(struct cgroup *cgroup, struct cftype *cft,
struct seq_file *m)
{
struct cpuacct *ca = cgroup_ca(cgroup);
u64 percpu;
int i;

for_each_present_cpu(i) {
percpu = cpuacct_cpuusage_read(ca, i);
seq_printf(m, "%llu ", (unsigned long long) percpu);
}
seq_printf(m, "\n");
return 0;
}

static struct cftype files[] = {
{
.name = "usage",
.read_u64 = cpuusage_read,
.write_u64 = cpuusage_write,
},
{
.name = "usage_percpu",
.read_seq_string = cpuacct_percpu_seq_read,
},

};

static int cpuacct_populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
Expand Down

0 comments on commit e6bdf25

Please sign in to comment.