Thread (85 messages) 85 messages, 9 authors, 2024-11-05

Re: [PATCH v2 04/33] mm: Split slab into its own type

From: Johannes Weiner <hannes@cmpxchg.org>
Date: 2021-12-14 14:25:15
Also in: linux-patches

On Wed, Dec 01, 2021 at 07:14:41PM +0100, Vlastimil Babka wrote:
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

Make struct slab independent of struct page. It still uses the
underlying memory in struct page for storing slab-specific data,
but slab and slub can now be weaned off using struct page directly.
Some of the wrapper functions (slab_address() and slab_order())
still need to cast to struct folio, but this is a significant
disentanglement.

[ vbabka@suse.cz: Rebase on folios, use folio instead of page where possible.

  Do not duplicate flags field in struct slab, instead make the related
  accessors go through slab_folio(). For testing pfmemalloc use the
  folio_*_active flag accessors directly so the PageSlabPfmemalloc wrappers can
  be removed later.

  Make folio_slab() expect only folio_test_slab() == true folios and
  virt_to_slab() return NULL when folio_test_slab() == false.

  Move struct slab to mm/slab.h.

  Don't represent with struct slab pages that are not true slab pages, but
  just a compound page obtained directly rom page allocator (with large
  kmalloc() for SLUB and SLOB). ]

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Vlastimil Babka <redacted>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help