From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Vlastimil Babka <vbabka@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: linux-next: manual merge of the slab tree with the mm tree
Date: Tue, 2 Jan 2024 15:34:38 +1100 [thread overview]
Message-ID: <20240102153438.5b29f8c5@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2800 bytes --]
Hi all,
Today's linux-next merge of the slab tree got a conflict in:
mm/slab_common.c
between commits:
01869cf7b4c6 ("slub: use folio APIs in free_large_kmalloc()")
8017164cb101 ("slub: use a folio in __kmalloc_large_node")
from the mm tree and commits:
b774d3e326d3 ("mm/slab: move kfree() from slab_common.c to slub.c")
4862caa5cba0 ("mm/slab: move kmalloc() functions from slab_common.c to slub.c")
from the slab tree.
I fixed it up (I used the latter version of this file and applied the
following merge fix patch) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 2 Jan 2024 15:26:48 +1100
Subject: [PATCH] fix up for "mm/slab: move kfree() from slab_common.c to
slub.c"
and "mm/slab: move kmalloc() functions from slab_common.c to slub.c"
interacting with commits
01869cf7b4c6 ("slub: use folio APIs in free_large_kmalloc()")
8017164cb101 ("slub: use a folio in __kmalloc_large_node")
from the mm tree
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
mm/slub.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 236e728e49ed..2ef88bbf56a3 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3915,7 +3915,7 @@ EXPORT_SYMBOL(kmem_cache_alloc_node);
*/
static void *__kmalloc_large_node(size_t size, gfp_t flags, int node)
{
- struct page *page;
+ struct folio *folio;
void *ptr = NULL;
unsigned int order = get_order(size);
@@ -3923,10 +3923,10 @@ static void *__kmalloc_large_node(size_t size, gfp_t flags, int node)
flags = kmalloc_fix_flags(flags);
flags |= __GFP_COMP;
- page = alloc_pages_node(node, flags, order);
- if (page) {
- ptr = page_address(page);
- mod_lruvec_page_state(page, NR_SLAB_UNRECLAIMABLE_B,
+ folio = (struct folio *)alloc_pages_node(node, flags, order);
+ if (folio) {
+ ptr = folio_address(folio);
+ lruvec_stat_mod_folio(folio, NR_SLAB_UNRECLAIMABLE_B,
PAGE_SIZE << order);
}
@@ -4375,9 +4375,9 @@ static void free_large_kmalloc(struct folio *folio, void *object)
kasan_kfree_large(object);
kmsan_kfree_large(object);
- mod_lruvec_page_state(folio_page(folio, 0), NR_SLAB_UNRECLAIMABLE_B,
+ lruvec_stat_mod_folio(folio, NR_SLAB_UNRECLAIMABLE_B,
-(PAGE_SIZE << order));
- __free_pages(folio_page(folio, 0), order);
+ folio_put(folio);
}
/**
--
2.43.0
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2024-01-02 4:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 4:34 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-16 4:27 Stephen Rothwell
2025-01-22 3:18 ` Stephen Rothwell
2024-01-02 4:02 Stephen Rothwell
2023-12-21 6:34 Stephen Rothwell
2023-11-27 1:29 Stephen Rothwell
2023-06-19 4:03 Stephen Rothwell
2023-06-19 12:16 ` Catalin Marinas
2023-04-05 4:08 Stephen Rothwell
2023-04-05 4:10 ` Yosry Ahmed
2023-03-17 1:44 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240102153438.5b29f8c5@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®