On Sun, 1 Sep 2024 21:41:28 -0700 Suren Baghdasaryan wrote:
> Add CONFIG_PGALLOC_TAG_USE_PAGEFLAGS to store allocation tag
> references directly in the page flags. This removes dependency on
> page_ext and results in better performance for page allocations as
> well as reduced page_ext memory ov
Add CONFIG_PGALLOC_TAG_USE_PAGEFLAGS to store allocation tag
references directly in the page flags. This removes dependency on
page_ext and results in better performance for page allocations as
well as reduced page_ext memory overhead.
CONFIG_PGALLOC_TAG_REF_BITS controls the number of bits require
Add mas_for_each_rev() function to iterate maple tree nodes in reverse
order.
Suggested-by: Liam R. Howlett
Signed-off-by: Suren Baghdasaryan
---
include/linux/maple_tree.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.
When a module gets unloaded there is a possibility that some of the
allocations it made are still used and therefore the allocation tags
corresponding to these allocations are still referenced. As such, the
memory for these tags can't be freed. This is currently handled as an
abnormal situation and
On Sun, 1 Sep 2024 21:41:27 -0700 Suren Baghdasaryan wrote:
> Introduce CONFIG_PGALLOC_TAG_REF_BITS to control the size of the
> page allocation tag references. When the size is configured to be
> less than a direct pointer, the tags are searched using an index
> stored as the tag reference.
>
Introduce CONFIG_PGALLOC_TAG_REF_BITS to control the size of the
page allocation tag references. When the size is configured to be
less than a direct pointer, the tags are searched using an index
stored as the tag reference.
Signed-off-by: Suren Baghdasaryan
---
include/linux/alloc_tag.h | 10
To simplify further refactoring, open-code the only two callers
of alloc_tag_ref_set().
Signed-off-by: Suren Baghdasaryan
---
include/linux/alloc_tag.h | 25 ++---
include/linux/pgalloc_tag.h | 12 +++-
2 files changed, 13 insertions(+), 24 deletions(-)
diff --git
This patchset implements several improvements:
1. Gracefully handles module unloading while there are used allocations
allocated from that module;
2. Provides an option to reduce memory overhead from storing page
allocation references by indexing allocation tags;
3. Provides an option to store page
To simplify later changes to page tag references, introduce new
pgalloc_tag_ref and pgtag_ref_handle types. This allows easy
replacement of page_ext as a storage of page allocation tags
Signed-off-by: Suren Baghdasaryan
---
include/linux/pgalloc_tag.h | 144 +++-