percpu: implmeent pcpu_nr_empty_pop_pages and chunk->nr_populated
authorTejun Heo <tj@kernel.org>
Tue, 2 Sep 2014 18:46:05 +0000 (14:46 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 2 Sep 2014 18:46:05 +0000 (14:46 -0400)
commitb539b87fed37ffc16c89a6bc3beca2d7aed82e1c
tree62657355b1f570ca9fe4cee455a41125e84dce7c
parent9c824b6a172c8d44a6b037946bae90127c969b1b
percpu: implmeent pcpu_nr_empty_pop_pages and chunk->nr_populated

pcpu_nr_empty_pop_pages counts the number of empty populated pages
across all chunks and chunk->nr_populated counts the number of
populated pages in a chunk.  Both will be used to implement pre/async
population for atomic allocations.

pcpu_chunk_[de]populated() are added to update chunk->populated,
chunk->nr_populated and pcpu_nr_empty_pop_pages together.  All
successful chunk [de]populations should be followed by the
corresponding pcpu_chunk_[de]populated() calls.

Signed-off-by: Tejun Heo <tj@kernel.org>
mm/percpu-km.c
mm/percpu.c