summaryrefslogtreecommitdiffstats
path: root/mm/percpu-internal.h
diff options
context:
space:
mode:
authorDennis Zhou <dennis@kernel.org>2019-02-26 19:00:08 +0100
committerDennis Zhou <dennis@kernel.org>2019-03-13 20:25:31 +0100
commit92c14cab43267411bc9160f23d55a7548d814483 (patch)
tree9aa31dff3801639a5ef792157d12109976bf12d5 /mm/percpu-internal.h
parentpercpu: make pcpu_block_md generic (diff)
downloadlinux-92c14cab43267411bc9160f23d55a7548d814483.tar.xz
linux-92c14cab43267411bc9160f23d55a7548d814483.zip
percpu: convert chunk hints to be based on pcpu_block_md
As mentioned in the last patch, a chunk's hints are no different than a block just responsible for more bits. This converts chunk level hints to use a pcpu_block_md to maintain them. This lets us reuse the same hint helper functions as a block. The left_free and right_free are unused by the chunk's pcpu_block_md. Signed-off-by: Dennis Zhou <dennis@kernel.org> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'mm/percpu-internal.h')
-rw-r--r--mm/percpu-internal.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/percpu-internal.h b/mm/percpu-internal.h
index 119bd1119aa7..0468ba500bd4 100644
--- a/mm/percpu-internal.h
+++ b/mm/percpu-internal.h
@@ -39,9 +39,7 @@ struct pcpu_chunk {
struct list_head list; /* linked to pcpu_slot lists */
int free_bytes; /* free bytes in the chunk */
- int contig_bits; /* max contiguous size hint */
- int contig_bits_start; /* contig_bits starting
- offset */
+ struct pcpu_block_md chunk_md;
void *base_addr; /* base address of this chunk */
unsigned long *alloc_map; /* allocation map */
@@ -49,7 +47,6 @@ struct pcpu_chunk {
struct pcpu_block_md *md_blocks; /* metadata blocks */
void *data; /* chunk data */
- int first_bit; /* no free below this */
bool immutable; /* no [de]population allowed */
int start_offset; /* the overlap with the previous
region to have a page aligned