Received: by 10.223.164.202 with SMTP id h10csp886744wrb; Tue, 7 Nov 2017 16:55:49 -0800 (PST) X-Google-Smtp-Source: ABhQp+SJDVROWYsXoVi7YXsqfo3Gr/TOydEwjnrUZklpdwhmgEjKZ5kiR3C+7VHMuWFgd8fXsoi8 X-Received: by 10.99.181.67 with SMTP id u3mr546137pgo.118.1510102549186; Tue, 07 Nov 2017 16:55:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510102549; cv=none; d=google.com; s=arc-20160816; b=uJHIJfmrAwtb8k43IuzRpeV8s4zUai8Q1h1Df34037sg5SRDmX+eyaMv3ryyHxjb8S iCDaEmTl3y8qA3FT7zmxa9TYQ7XMy1Nxf8g9H3Z3hRXBCUifheCmaAgkVWbRWL3ivM2o 3wwH6G/D3uJOxuekgt7K36s4Iv5SqlxUP9puqbSUexI/yjrtAG4nD+q6N7LCsVID1Fha R/S9lzAX6wHEnN+ejNt+G/q7hT/ikqke6DWRQWzvi7GKe8dsNENgbuK74qfsaiRebENW LfInUD7ocdx9OFmFLhhfp26jRoxdlmH1rYPyuz/9AUPv3sRZD8I3BhNvqbqfIjKb2L4u IawA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=0+4boMKLUwinLw1v1zBIavsA4whhyqtODvcqR6JhbaA=; b=Rja9OECgnlKfq3QxMWPoyICTVHkWDqkrSBMVewRdTmySXkMsO04qy+gaY5LvGyh24B hXf8kJshFDeT225cHuHnELeuztiSP3936xK7rHOkU9GKeN+ctLywZxWT2VcS5LnLdyE8 HTUZoONChPXcyDYMUgd81AhHqWt6TRWmJ0pNnYAwksSMF01Fe3CbdWfusaI0VEdj5dpa YzAy/ZvZsOIlvrJ+pYz+rwss/MdO91hFq2bzHWNXh5mQ30IXujpNdJd5SEnx3pxUXPRA wMAlkbAEHiR6zRs+LAu/7jXP+6yMvTs21YtqJ6+MXWUnRBO2cDmT0fwExPnErs6kxd1/ vb6Q== 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 e1si2355121pln.764.2017.11.07.16.55.36; Tue, 07 Nov 2017 16:55:49 -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 S965309AbdKGPWV (ORCPT + 92 others); Tue, 7 Nov 2017 10:22:21 -0500 Received: from resqmta-ch2-01v.sys.comcast.net ([69.252.207.33]:36190 "EHLO resqmta-ch2-01v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754910AbdKGPWU (ORCPT ); Tue, 7 Nov 2017 10:22:20 -0500 Received: from resomta-ch2-20v.sys.comcast.net ([69.252.207.116]) by resqmta-ch2-01v.sys.comcast.net with ESMTP id C5hVenaaeFYFhC5hke7IfF; Tue, 07 Nov 2017 15:22:20 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-20v.sys.comcast.net with SMTP id C5hiezzbIXtd9C5hieUoXg; Tue, 07 Nov 2017 15:22:19 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 4093111602C5; Tue, 7 Nov 2017 09:22:18 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 3D5621160140; Tue, 7 Nov 2017 09:22:18 -0600 (CST) Date: Tue, 7 Nov 2017 09:22:18 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Miles Chen cc: Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, wsd_upstream@mediatek.com, linux-mediatek@lists.infradead.org Subject: Re: [PATCH] slub: Fix sysfs duplicate filename creation when slub_debug=O In-Reply-To: <1510023934-17517-1-git-send-email-miles.chen@mediatek.com> Message-ID: References: <1510023934-17517-1-git-send-email-miles.chen@mediatek.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfImg3v/DRc5Pf5VO0m9RZg2SrQtr4gU2GF01A/zrUDC1FjxBePeHJPR0mnjkUeQoi8QIK4o+9e4seC5HeR3sv4mA/HxcdbOotsSm4uwxh1yg/MryvAsW QuB/wrbM8+iiOx5f1PAa/zmGl3fazvrX88brLjrfLuLiMVmU+qFy72HLVehi9DRc998lHRa2K0j0X96F/4xuls8/lMMMFkjbrxxqExtAUI9GYt0O4jaxd+TO jbGJFYA4+4+fp1paeqXt1HJGLNB27+pcVFv5LCQt7pku7Xnptf/Cpp0rPv9V/eF4OvSGMLJ5liyHi8MnBgfMv0qjKbZdcigbbuZhk0tvJXC+iMheu8dAI2Qn xNQ677fRofj1igpZhERX+L8rSb6XzOWcNw/fRUKQ4OU7DJfqP1b/Q220y7pQ12OlOyT66tlw+QlPJim3P4hrGg97CS/2nAqahaFgZz12MpLjK0a7ybs= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Nov 2017, miles.chen@mediatek.com wrote: > When slub_debug=O is set. It is possible to clear debug flags > for an "unmergeable" slab cache in kmem_cache_open(). > It makes the "unmergeable" cache became "mergeable" in sysfs_slab_add(). Right but that is only if disable_higher_order_debug is set. > These caches will generate their "unique IDs" by create_unique_id(), > but it is possible to create identical unique IDs. In my experiment, > sgpool-128, names_cache, biovec-256 generate the same ID ":Ft-0004096" > and the kernel reports "sysfs: cannot create duplicate filename > '/kernel/slab/:Ft-0004096'". Ok then the aliasing failed for some reason. The creation of the unique id and the alias detection needs to be in sync otherwise duplicate filenames are created. What is the difference there? The clearing of the DEBUG_METADATA_FLAGS looks ok to me. kmem_cache_alias should do the same right? From 1583422685647743875@xxx Tue Nov 07 15:45:47 +0000 2017 X-GM-THRID: 1583422685647743875 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread