Re: [PATCH v2 00/33] Separate struct slab from struct page

From
Roman Gushchin <hidden>
Date
2021-12-15 23:39:14
Also in
linux-iommu, linux-mm, linux-patches
Reply to
Roman Gushchin, 2021-12-15
On Tue, Dec 14, 2021 at 05:03:12PM -0800, Roman Gushchin wrote:
On Tue, Dec 14, 2021 at 01:57:22PM +0100, Vlastimil Babka wrote:
quoted
On 12/1/21 19:14, Vlastimil Babka wrote:
quoted
Folks from non-slab subsystems are Cc'd only to patches affecting them, and
this cover letter.

Series also available in git, based on 5.16-rc3:
https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git/log/?h=slab-struct_slab-v2r2
Pushed a new branch slab-struct-slab-v3r3 with accumulated fixes and small tweaks
and a new patch from Hyeonggon Yoo on top. To avoid too much spam, here's a range diff:
Hi Vlastimil!

I've started to review this patchset (btw, a really nice work, I like
the resulting code way more). Because I'm looking at v3 and I don't have
the whole v2 in my mailbox, here is what I've now:

* mm: add virt_to_folio() and folio_address()
Reviewed-by: Roman Gushchin <redacted>

* mm/slab: Dissolve slab_map_pages() in its caller
Reviewed-by: Roman Gushchin <redacted>

* mm/slub: Make object_err() static
Reviewed-by: Roman Gushchin <redacted>

* mm: Split slab into its own type
1) Shouldn't SLAB_MATCH() macro use struct folio instead of struct page for the
comparison?
2) page_slab() is used only in kasan and only in one place, so maybe it's better
to not introduce it as a generic helper?
Other than that
Reviewed-by: Roman Gushchin <redacted>

* mm: Add account_slab() and unaccount_slab()
1) maybe change the title to convert/replace instead of add?
2) maybe move later changes to memcg_alloc_page_obj_cgroups() to this patch?
Reviewed-by: Roman Gushchin <redacted>

* mm: Convert virt_to_cache() to use struct slab
Reviewed-by: Roman Gushchin <redacted>

* mm: Convert __ksize() to struct slab
It looks like certain parts of __ksize() can be merged between slab, slub and slob?
Reviewed-by: Roman Gushchin <redacted>

* mm: Use struct slab in kmem_obj_info()
Reviewed-by: Roman Gushchin <redacted>
Part 2:

* mm: Convert check_heap_object() to use struct slab
Reviewed-by: Roman Gushchin <redacted>

* mm/slub: Convert detached_freelist to use a struct slab
How about to convert free_nonslab_page() to free_nonslab_folio()?
And maybe rename it to something like free_large_kmalloc()?
If I'm not missing something, large kmallocs is the only way how we can end up
there with a !slab folio/page.

* mm/slub: Convert kfree() to use a struct slab
Reviewed-by: Roman Gushchin <redacted>

* mm/slub: Convert __slab_lock() and __slab_unlock() to struct slab
Reviewed-by: Roman Gushchin <redacted>

* mm/slub: Convert print_page_info() to print_slab_info()
Do we really need to explicitly convert slab_folio()'s result to (struct folio *)?
Reviewed-by: Roman Gushchin <redacted>

* mm/slub: Convert alloc_slab_page() to return a struct slab
Reviewed-by: Roman Gushchin <redacted>

* mm/slub: Convert __free_slab() to use struct slab
Reviewed-by: Roman Gushchin <redacted>

* mm/slub: Convert pfmemalloc_match() to take a struct slab
Cool! Removing pfmemalloc_unsafe() is really nice.
Reviewed-by: Roman Gushchin <redacted>

* mm/slub: Convert most struct page to struct slab by spatch
Reviewed-by: Roman Gushchin <redacted>

* mm/slub: Finish struct page to struct slab conversion
Reviewed-by: Roman Gushchin <redacted>

* mm/slab: Convert kmem_getpages() and kmem_freepages() to struct slab
Reviewed-by: Roman Gushchin <redacted>

* mm/slab: Convert most struct page to struct slab by spatch

Another patch with the same title? Rebase error?

* mm/slab: Finish struct page to struct slab conversion

And this one too?


Thanks!

Roman
Thread (25 messages) 25 messages, 7 authors, last reply 2022-01-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help