mm/percpu: add comment to state the empty populated pages accounting
authorBaoquan He <bhe@redhat.com>
Tue, 25 Oct 2022 03:45:16 +0000 (11:45 +0800)
committerDennis Zhou <dennis@kernel.org>
Tue, 8 Nov 2022 06:59:12 +0000 (22:59 -0800)
commit73046f8d31701c379f6db899cb09ba70a3285143
tree64a181641e3544167a02388136a70d30ab1faf46
parente04cb6976340d5ebf2b28ad91bf6a13a285aa566
mm/percpu: add comment to state the empty populated pages accounting

When allocating an area from a chunk, pcpu_block_update_hint_alloc()
is called to update chunk metadata, including chunk's and global
nr_empty_pop_pages. However, if the allocation is not atomic, some
blocks may not be populated with pages yet, while we still subtract
the number here. The number of pages will be added back with
pcpu_chunk_populated() when populating pages.

Adding code comment to make that more understandable.

Signed-off-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
mm/percpu.c