Received: by 10.223.164.202 with SMTP id h10csp1850848wrb; Sat, 11 Nov 2017 17:41:23 -0800 (PST) X-Google-Smtp-Source: AGs4zMahgWtPKDp8WddIkFdzEGieUkPnyH+sHIWuIP3vERwMSRgdnXoBsOnurdDcQ0MblNE0BO4W X-Received: by 10.99.124.24 with SMTP id x24mr4689035pgc.196.1510450883680; Sat, 11 Nov 2017 17:41:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510450883; cv=none; d=google.com; s=arc-20160816; b=l1rsubvSOfSipW/ssxz3owCufcFZiDctzPfExWb1/h0PY1QkI4qSCDZCSQOXe9Y50B /CPK3DvaeLuBy2Sq1YcvL6fG8lfgHSSuvl23CWthEl7NX6Py7xUTb1TC/J6Gob6p+hM/ WzhGU9yFnzwYy/pUDY13WFs876HRk0NsBUQc8LyPDhTsIQI0fdqjvh+juzBlGDnCKA8I v+O3TIrua+TpzttK3iYUt9wSKITBw1aRZ9Dojz10rTQLbMPMZaIDkzXJTFQAZgQDGVc2 DQeNd5KmAAigGVKjOac6J1WdwKHyrzGpjMytc9XonujUKrMEf0hJg9H91LraekqmS+ql D+ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=UX3TJMxJ2rlhIq5NERUdZKDuyup0wM84AZk+ERtTVBk=; b=q+pOt/Gbeu38zeY+t25iYxYeLPSBZkTWeVDYpD1u4uJlOkNaoBQ3Jg4iD7M2/6VIlK vpEEYmXnPbkoA6wPQ1f4X/JsyIPP2eFWt/lJkkSobx7EaIxz1CWui874eUkc1wqOxSpD 6cH7f/doVchTNh3KJbsKdNcszQljS9Ywz1lmel9CbyaUoeW85FSNX0lzyNrOJ3PT5qGK KKfPuoFg0t5FDtY6Pgk+M1VOBS94nX+w+qbz+Oc6f+LzlbL2zY5JUTHx8re+MXGEixHN m3xYyOMHomJQIFhY1wxMjPmCuGI6Bdsx36ILDQsLRmSwjLzVt3L6PMDOH5w7d1EaF39E Ya1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si11629874ple.631.2017.11.11.17.41.11; Sat, 11 Nov 2017 17:41:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752581AbdKLBkg (ORCPT + 85 others); Sat, 11 Nov 2017 20:40:36 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:64583 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752443AbdKLBkf (ORCPT ); Sat, 11 Nov 2017 20:40:35 -0500 X-UUID: 09ee05ca69ef4d44b65aa022120181da-20171112 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 372327931; Sun, 12 Nov 2017 09:40:30 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sun, 12 Nov 2017 09:40:29 +0800 Received: from [172.21.77.33] (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Sun, 12 Nov 2017 09:40:23 +0800 Message-ID: <1510450823.27196.2.camel@mtkswgap22> Subject: Re: [PATCH] slub: Fix sysfs duplicate filename creation when slub_debug=O From: Miles Chen To: Christopher Lameter CC: Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , , , , Date: Sun, 12 Nov 2017 09:40:23 +0800 In-Reply-To: References: <1510023934-17517-1-git-send-email-miles.chen@mediatek.com> <1510119138.17435.19.camel@mtkswgap22> <1510217554.32371.17.camel@mtkswgap22> <1510271512.11555.3.camel@mtkswgap22> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-11-10 at 10:02 -0600, Christopher Lameter wrote: > On Fri, 10 Nov 2017, Miles Chen wrote: > > > By checking disable_higher_order_debug & (slub_debug & > > SLAB_NEVER_MERGE), we can detect if a cache is unmergeable but become > > mergeable because the disable_higher_order_debug=1 logic. Those kind of > > caches should be keep unmergeable. > > Acked-by: Christoph Lameter > Thanks for the ack, I already sent a v2 patch to fix a build warning in this patch.(fix a build error: use instead DEBUG_METADATA_FLAGS of SLAB_NEVER_MERGE) diff --git a/mm/slub.c b/mm/slub.c index 1efbb812..8e1c027 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5704,6 +5704,10 @@ static int sysfs_slab_add(struct kmem_cache *s) return 0; } + if (!unmergeable && disable_higher_order_debug && + (slub_debug & DEBUG_METADATA_FLAGS)) + unmergeable = 1; + if (unmergeable) { /* * Slabcache can never be merged so we can use the name proper. From 1583695609697848281@xxx Fri Nov 10 16:03:47 +0000 2017 X-GM-THRID: 1583422685647743875 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread