Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189554
b: refs/heads/master
c: a3a2e76
h: refs/heads/master
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Apr 7, 2010
1 parent d6e5420 commit f136cab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 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: b01d0942c2b7a3026d2b7d38b5773d3d00420e06
refs/heads/master: a3a2e76c77fa22b114e421ac11dec0c56c3503fb
3 changes: 2 additions & 1 deletion trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,8 @@ NORET_TYPE void do_exit(long code)

acct_update_integrals(tsk);
/* sync mm's RSS info before statistics gathering */
sync_mm_rss(tsk, tsk->mm);
if (tsk->mm)
sync_mm_rss(tsk, tsk->mm);
group_dead = atomic_dec_and_test(&tsk->signal->live);
if (group_dead) {
hrtimer_cancel(&tsk->signal->real_timer);
Expand Down
3 changes: 3 additions & 0 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
p->prev_utime = cputime_zero;
p->prev_stime = cputime_zero;
#endif
#if defined(SPLIT_RSS_COUNTING)
memset(&p->rss_stat, 0, sizeof(p->rss_stat));
#endif

p->default_timer_slack_ns = current->timer_slack_ns;

Expand Down
3 changes: 1 addition & 2 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,12 @@ core_initcall(init_zero_pfn);

#if defined(SPLIT_RSS_COUNTING)

void __sync_task_rss_stat(struct task_struct *task, struct mm_struct *mm)
static void __sync_task_rss_stat(struct task_struct *task, struct mm_struct *mm)
{
int i;

for (i = 0; i < NR_MM_COUNTERS; i++) {
if (task->rss_stat.count[i]) {
BUG_ON(!mm);
add_mm_counter(mm, i, task->rss_stat.count[i]);
task->rss_stat.count[i] = 0;
}
Expand Down

0 comments on commit f136cab

Please sign in to comment.