Skip to content

Commit

Permalink
percpu: make percpu-km set chunk->populated bitmap properly
Browse files Browse the repository at this point in the history
percpu-km instantiates the whole chunk on creation and doesn't make
use of chunk->populated bitmap and leaves it as zero.  While this
currently doesn't cause any problem, the inconsistency makes it
difficult to build further logic on top of chunk->populated.  This
patch makes percpu-km fill chunk->populated on creation so that the
bitmap is always consistent.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Christoph Lameter <cl@linux.com>
  • Loading branch information
htejun committed Sep 2, 2014
1 parent a93ace4 commit a63d4ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mm/percpu-km.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ static struct pcpu_chunk *pcpu_create_chunk(void)

chunk->data = pages;
chunk->base_addr = page_address(pages) - pcpu_group_offsets[0];

bitmap_fill(chunk->populated, nr_pages);

return chunk;
}

Expand Down

0 comments on commit a63d4ac

Please sign in to comment.