On Thu, Apr 14, 2022 at 05:57:04PM +0900, Hyeonggon Yoo wrote:
> Changes since v1:
> - The code is basically same, but split some patches to make it
> easier to review.
> - Adjusted comments and added Reviewed-by from Vlastimil. Thanks!
>
> Hello, this series is cleanup of kmalloc code. After this series,
> kmalloc subsystem is perfectly generalized on SLAB and SLUB.
>
> This series is not small, but each patch is easy to review and
> I bet you will like this :)
>
> Many thanks to Matthew, Marco, Vlastimil who gave comments
> in previous series.
>
> Any feedbacks will be appreciated.
> Thanks!
I mistakenly sent a wrong version of series, before fixing a build bug
and a build warning. The latest version is available at:
https://github.com/hygoni/linux/tree/slab-common-v5.19-v1r1
And below is difference between the series in this thread
and tree above is:
diff --git a/0018-mm-sl-au-b-generalize-kmalloc-subsystem.patch b/0018-mm-sl-au-b-generalize-kmalloc-subsystem-v2.patch
index 2389975..510f7fd 100644
--- a/0018-mm-sl-au-b-generalize-kmalloc-subsystem.patch
+++ b/0018-mm-sl-au-b-generalize-kmalloc-subsystem-v2.patch
@@ -207,7 +207,7 @@ index 3cd5d7a47ec7..daf626e25e12 100644
+
+ slab = folio_slab(folio);
+ s = slab->slab_cache;
-+ __kmem_cache_free(s, object, _RET_IP_);
++ __kmem_cache_free(s, (void *)object, _RET_IP_);
+}
+EXPORT_SYMBOL(kfree);
+
Fixed a warning here
diff --git a/0020-mm-slab_common-factor-out-__do_kmalloc_node.patch b/0020-mm-slab_common-factor-out-__do_kmalloc_node-v2.patch
index 133d293..30d9ca2 100644
--- a/0020-mm-slab_common-factor-out-__do_kmalloc_node.patch
+++ b/0020-mm-slab_common-factor-out-__do_kmalloc_node-v2.patch
@@ -60,7 +60,7 @@ index 6abe7f61c197..af563e64e8aa 100644
- ret = kasan_kmalloc(s, ret, size, gfpflags);
-
- return ret;
-+ return __do_kmalloc_node(size, flags, node, caller);
++ return __do_kmalloc_node(size, gfpflags, node, caller);
}
EXPORT_SYMBOL(__kmalloc_node_track_caller);
And a build bug here.
Anything else looks just fine.
Thanks!
--
Thanks,
Hyeonggon