From 047924c96898266e9a37412434abd1db72600384 Mon Sep 17 00:00:00 2001 From: Dennis Zhou Date: Tue, 26 Feb 2019 09:56:16 -0800 Subject: percpu: make pcpu_block_md generic In reality, a chunk is just a block covering a larger number of bits. The hints themselves are one in the same. Rather than maintaining the hints separately, first introduce nr_bits to genericize pcpu_block_update() to correctly maintain block->right_free. The next patch will convert chunk hints to be managed as a pcpu_block_md. Signed-off-by: Dennis Zhou Reviewed-by: Peng Fan --- mm/percpu-internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'mm/percpu-internal.h') diff --git a/mm/percpu-internal.h b/mm/percpu-internal.h index ec58b244545d..119bd1119aa7 100644 --- a/mm/percpu-internal.h +++ b/mm/percpu-internal.h @@ -28,6 +28,7 @@ struct pcpu_block_md { int right_free; /* size of free space along the right side of the block */ int first_free; /* block position of first free */ + int nr_bits; /* total bits responsible for */ }; struct pcpu_chunk { -- cgit v1.2.3-55-g7522