linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Vlastimil Babka <vbabka@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the slab tree with the mm tree
Date: Mon, 19 Jun 2023 14:03:30 +1000	[thread overview]
Message-ID: <20230619140330.28437ac3@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]

Hi all,

Today's linux-next merge of the slab tree got a conflict in:

  mm/slab_common.c

between commits:

  fef594ee7142 ("mm/slab: simplify create_kmalloc_cache() args and make it static")
  6e6f174b6eda ("mm/slab: limit kmalloc() minimum alignment to dma_get_cache_alignment()")

from the mm tree and commit:

  d5bf48574699 ("mm/slab_common: use SLAB_NO_MERGE instead of negative refcount")

from the slab tree.

I fixed it up (I think - see below) 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.

-- 
Cheers,
Stephen Rothwell

diff --cc mm/slab_common.c
index 43c008165f56,90ecaface410..000000000000
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@@ -892,24 -876,17 +890,24 @@@ new_kmalloc_cache(int idx, enum kmalloc
  		flags |= SLAB_CACHE_DMA;
  	}
  
 +	if (minalign > ARCH_KMALLOC_MINALIGN) {
 +		aligned_size = ALIGN(aligned_size, minalign);
 +		aligned_idx = __kmalloc_index(aligned_size, false);
 +	}
 +
+ 	/*
+ 	 * If CONFIG_MEMCG_KMEM is enabled, disable cache merging for
+ 	 * KMALLOC_NORMAL caches.
+ 	 */
+ 	if (IS_ENABLED(CONFIG_MEMCG_KMEM) && (type == KMALLOC_NORMAL))
+ 		flags |= SLAB_NO_MERGE;
+ 
 -	kmalloc_caches[type][idx] = create_kmalloc_cache(
 -					kmalloc_info[idx].name[type],
 -					kmalloc_info[idx].size, flags, 0,
 -					kmalloc_info[idx].size);
 +	if (!kmalloc_caches[type][aligned_idx])
 +		kmalloc_caches[type][aligned_idx] = create_kmalloc_cache(
 +					kmalloc_info[aligned_idx].name[type],
 +					aligned_size, flags);
 +	if (idx != aligned_idx)
 +		kmalloc_caches[type][idx] = kmalloc_caches[type][aligned_idx];
- 
- 	/*
- 	 * If CONFIG_MEMCG_KMEM is enabled, disable cache merging for
- 	 * KMALLOC_NORMAL caches.
- 	 */
- 	if (IS_ENABLED(CONFIG_MEMCG_KMEM) && (type == KMALLOC_NORMAL))
- 		kmalloc_caches[type][idx]->refcount = -1;
  }
  
  /*

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2023-06-19  4:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-19  4:03 Stephen Rothwell [this message]
2023-06-19 12:16 ` linux-next: manual merge of the slab tree with the mm tree Catalin Marinas
  -- strict thread matches above, loose matches on Subject: below --
2024-01-02  4:34 Stephen Rothwell
2024-01-02  4:02 Stephen Rothwell
2023-12-21  6:34 Stephen Rothwell
2023-11-27  1:29 Stephen Rothwell
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=20230619140330.28437ac3@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=vbabka@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).