Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366099
b: refs/heads/master
c: 14c6d3c
h: refs/heads/master
i:
  366097: 769e9bc
  366095: aad13fc
v: v3
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Apr 10, 2013
1 parent 65113fc commit a20dbd7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 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: 7943e15a3e91db78a7a3fbc84e45cf9d1c7c7d23
refs/heads/master: 14c6d3c8a47ced185b6375c4940b5b393f1a294e
2 changes: 0 additions & 2 deletions trunk/kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6936,8 +6936,6 @@ void __init sched_init(void)

#endif /* CONFIG_CGROUP_SCHED */

cpuacct_init();

for_each_possible_cpu(i) {
struct rq *rq;

Expand Down
11 changes: 4 additions & 7 deletions trunk/kernel/sched/cpuacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ static inline struct cpuacct *parent_ca(struct cpuacct *ca)
}

static DEFINE_PER_CPU(u64, root_cpuacct_cpuusage);
static struct cpuacct root_cpuacct;
static struct cpuacct root_cpuacct = {
.cpustat = &kernel_cpustat,
.cpuusage = &root_cpuacct_cpuusage,
};

/* create a new cpu accounting group */
static struct cgroup_subsys_state *cpuacct_css_alloc(struct cgroup *cgrp)
Expand Down Expand Up @@ -288,12 +291,6 @@ void cpuacct_account_field(struct task_struct *p, int index, u64 val)
rcu_read_unlock();
}

void __init cpuacct_init(void)
{
root_cpuacct.cpustat = &kernel_cpustat;
root_cpuacct.cpuusage = &root_cpuacct_cpuusage;
}

struct cgroup_subsys cpuacct_subsys = {
.name = "cpuacct",
.css_alloc = cpuacct_css_alloc,
Expand Down
5 changes: 0 additions & 5 deletions trunk/kernel/sched/cpuacct.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#ifdef CONFIG_CGROUP_CPUACCT

extern void cpuacct_init(void);
extern void cpuacct_charge(struct task_struct *tsk, u64 cputime);
extern void cpuacct_account_field(struct task_struct *p, int index, u64 val);

#else

static inline void cpuacct_init(void)
{
}

static inline void cpuacct_charge(struct task_struct *tsk, u64 cputime)
{
}
Expand Down

0 comments on commit a20dbd7

Please sign in to comment.