|
@@ -612,8 +612,10 @@ static void mem_cgroup_charge_statistics(struct mem_cgroup *mem,
|
|
|
/* pagein of a big page is an event. So, ignore page size */
|
|
|
if (nr_pages > 0)
|
|
|
__this_cpu_inc(mem->stat->count[MEM_CGROUP_STAT_PGPGIN_COUNT]);
|
|
|
- else
|
|
|
+ else {
|
|
|
__this_cpu_inc(mem->stat->count[MEM_CGROUP_STAT_PGPGOUT_COUNT]);
|
|
|
+ nr_pages = -nr_pages; /* for event */
|
|
|
+ }
|
|
|
|
|
|
__this_cpu_add(mem->stat->count[MEM_CGROUP_EVENTS], nr_pages);
|
|
|
|