Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5860370rwd; Sun, 18 Jun 2023 21:24:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7iLKAO7NDlBxR1Vmp3/6etM5Qes4GdjpxqX0FXBd4xAG72CH6r3+b31dyi1+8XA4E3H3jD X-Received: by 2002:ad4:4ee9:0:b0:626:199e:1b96 with SMTP id dv9-20020ad44ee9000000b00626199e1b96mr10979672qvb.64.1687148656463; Sun, 18 Jun 2023 21:24:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687148656; cv=none; d=google.com; s=arc-20160816; b=PpHaodQpcE9mSOmyXzJfKCrlVJygRr/wLFexy0UxrvXBsuIOeLbCbaYIDIZluPcBMt 2S7VC6/wSsLG9AlOnbuaO+K726hhREpltHqCguq0EQMdiO6QL/bot8h6ASsBqmo4Qcu+ ZAB3PCt4il66gb1SnXjlTcJHlmZXvjeX76B6kHzxLbAwDnn1R1kHvoESMYeEixcySvIP mZ57w9+X7FEenahwg77VohTEl6JJRJ3Se/PGQys678TJhJUN1JWO8llvrqXU/cvVAPik VFcnW8e0UoNd9QvHWOH/9Kj7OcY46epnmfq2K7HnjdSSPgJbdHXrYkdErGUbWjiF33Ak Hd1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=TVJKR0fHhUqXJ3TbbCvXJXNSGk8DOs9SSkTVMI7js44=; b=mf12fbnI6PVbXhMRPn9beL6CcH94k5XSwvRca+sPIiLS2Cs+MGONJhJ+QuNW0TX5Yn n0tiZAksbGR5NLhGnzBcEvqN5RMVm+vtg77brbQmUcW6KJlQIvUm8QaN3txseMDTgIEY ryAeOQxS77QZEJVFWAGqA5ZfEkvZXamf/qWoTlJECfN0SyrDUzLTEFG5ZVRExh0CcxSt Isd+NMfNuDgKq6P9fiUa2Vq6HpjjgY2bID+osOvfZBLsWDDqo2ZIeLHQZyC+1PR+W5Wf 13AK+xZMpCWh5lpAxsqXk3FFXkb8VZgASF8DKVjeDiNJ4+CVPLNS6xrdiBWaEcXE51YR tsyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=RRsL5Hs+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu25-20020a632959000000b005529b8e496bsi8170375pgb.436.2023.06.18.21.24.02; Sun, 18 Jun 2023 21:24:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=RRsL5Hs+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229593AbjFSEDj (ORCPT + 99 others); Mon, 19 Jun 2023 00:03:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjFSEDh (ORCPT ); Mon, 19 Jun 2023 00:03:37 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F138FF; Sun, 18 Jun 2023 21:03:35 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Qkx2W7293z4wg8; Mon, 19 Jun 2023 14:03:31 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1687147412; bh=TVJKR0fHhUqXJ3TbbCvXJXNSGk8DOs9SSkTVMI7js44=; h=Date:From:To:Cc:Subject:From; b=RRsL5Hs+voOIPw2EbO1s+QfDR3X6tnQa8lp51qQl3AKX+O1vtEK/gBNFz2D3XEIkq r7+4QUsrPUPVobpg6yMoAFxehufDDI/L4apLtj/XOxZp0TX9egxrK4wNl5niE+n+Gc iqQMgyg2xQCoHuBQ/IhKNYIKIckYzmx+t17kCDbDw/h3NNyf81+4NdYWLdW753eBw7 of5tZHLX/eaL3PrPmh21PBGxZuEXUJPmK8/wzypx8dXBy0bMqzudqfGAvVOECzdVAs O+D0c24KTrR4RiP//USvQ/yRJyu0oASDeOOjytCMj3Mbjz1bvat+BI0wpXedFfVjwb VrJsyxJwL1clQ== Date: Mon, 19 Jun 2023 14:03:30 +1000 From: Stephen Rothwell To: Vlastimil Babka , Andrew Morton Cc: Catalin Marinas , Linux Kernel Mailing List , Linux Next Mailing List Subject: linux-next: manual merge of the slab tree with the mm tree Message-ID: <20230619140330.28437ac3@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/P2ovrU.PT44xPxmwCi3HdIE"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/P2ovrU.PT44xPxmwCi3HdIE Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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_cach= e_alignment()") from the mm tree and commit: d5bf48574699 ("mm/slab_common: use SLAB_NO_MERGE instead of negative refc= ount") 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. --=20 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 |=3D SLAB_CACHE_DMA; } =20 + if (minalign > ARCH_KMALLOC_MINALIGN) { + aligned_size =3D ALIGN(aligned_size, minalign); + aligned_idx =3D __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 =3D=3D KMALLOC_NORMAL)) + flags |=3D SLAB_NO_MERGE; +=20 - kmalloc_caches[type][idx] =3D 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] =3D create_kmalloc_cache( + kmalloc_info[aligned_idx].name[type], + aligned_size, flags); + if (idx !=3D aligned_idx) + kmalloc_caches[type][idx] =3D kmalloc_caches[type][aligned_idx]; -=20 - /* - * If CONFIG_MEMCG_KMEM is enabled, disable cache merging for - * KMALLOC_NORMAL caches. - */ - if (IS_ENABLED(CONFIG_MEMCG_KMEM) && (type =3D=3D KMALLOC_NORMAL)) - kmalloc_caches[type][idx]->refcount =3D -1; } =20 /* --Sig_/P2ovrU.PT44xPxmwCi3HdIE Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmSP05IACgkQAVBC80lX 0Gy5xggAhp9cBxE8LgtT4OOc7WzPGHTC8VJo0BzFwoTKajrY13vID48gbCLxvCqs ARm3L/mTpE6x/CnmONkqcj8+69wuMweo1Q/PCwQj9Jko3AL7/xRi3S1WEi7NEyGd XsqRGCYWPrByN70Xj7JI4nuX0Z0HlpEiLCoKieR672jKs3Qx52IGIy+Fu79THk5C I79ozx9QptBHEScdKrkxISO1f4Mls1ROo59RwEshfTxKMjbpCUXdUfmVaeCW6fM9 K9lTWi7eDN/ZSVEtAh6T/WrshLSsTj2k6yqQE6QPISxyJZUtbwRF634LCYCFBFvU 71qoLyjOEShQgVEhYHGPCcwSTr45og== =Rfgw -----END PGP SIGNATURE----- --Sig_/P2ovrU.PT44xPxmwCi3HdIE--