diff options
author | Dennis Zhou (Facebook) <dennisszhou@gmail.com> | 2017-07-25 01:02:14 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2017-07-26 23:41:05 +0200 |
commit | 13f966373f9296c0da2fb2764654cce520b3a6b4 (patch) | |
tree | fe1bee3a86577ecf25907f3586ae36cb338e0dcd /mm/percpu-internal.h | |
parent | percpu: add first_bit to keep track of the first free in the bitmap (diff) | |
download | linux-13f966373f9296c0da2fb2764654cce520b3a6b4.tar.xz linux-13f966373f9296c0da2fb2764654cce520b3a6b4.zip |
percpu: skip chunks if the alloc does not fit in the contig hint
This patch adds chunk->contig_bits_start to keep track of the contig
hint's offset and the check to skip the chunk if it does not fit. If
the chunk's contig hint starting offset cannot satisfy an allocation,
the allocator assumes there is enough memory pressure in this chunk to
either use a different chunk or create a new one. This accepts a less
tight packing for a smoother latency curve.
Signed-off-by: Dennis Zhou <dennisszhou@gmail.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm/percpu-internal.h')
-rw-r--r-- | mm/percpu-internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/percpu-internal.h b/mm/percpu-internal.h index e60e04966d96..7065faf74b46 100644 --- a/mm/percpu-internal.h +++ b/mm/percpu-internal.h @@ -29,6 +29,8 @@ 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 */ void *base_addr; /* base address of this chunk */ unsigned long *alloc_map; /* allocation map */ |