From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C3E0C47080 for ; Mon, 31 May 2021 11:08:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0503E610C9 for ; Mon, 31 May 2021 11:08:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0503E610C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8B4456B006C; Mon, 31 May 2021 07:08:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 864016B006E; Mon, 31 May 2021 07:08:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6DDA16B0070; Mon, 31 May 2021 07:08:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0177.hostedemail.com [216.40.44.177]) by kanga.kvack.org (Postfix) with ESMTP id 392726B006C for ; Mon, 31 May 2021 07:08:04 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D87F48249980 for ; Mon, 31 May 2021 11:08:03 +0000 (UTC) X-FDA: 78201251646.39.80F1BF9 Received: from m43-7.mailgun.net (m43-7.mailgun.net [69.72.43.7]) by imf10.hostedemail.com (Postfix) with ESMTP id 6297F4202A15 for ; Mon, 31 May 2021 11:07:50 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1622459283; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=Je2jG62bL2bT7Cs5lG5xTsh/f/2D1DPuOzZ1sWvFbZE=; b=Hmv78EEX/lbAH9C/KMFxUDDd4Y9qIsV5H1MYrjVEWkiQyln8nr+lRuRuYiY8lbRN8GUnpWoh 4SpgzZE+3HTLiw1G3zHHHYBkErbb4LtZWhv7MY0opnNdjCo7FEjDxlkMLXOg8vGOOobJLInS 8Y7Jv46FBn07PN4PyisFy88cE3s= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyIwY2Q3OCIsICJsaW51eC1tbUBrdmFjay5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-west-2.postgun.com with SMTP id 60b4c38bea2aacd729045dce (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 31 May 2021 11:07:55 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 66CBBC4360C; Mon, 31 May 2021 11:07:55 +0000 (UTC) Received: from [192.168.86.187] (unknown [49.204.181.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: faiyazm) by smtp.codeaurora.org (Postfix) with ESMTPSA id A50C5C433F1; Mon, 31 May 2021 11:07:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A50C5C433F1 Subject: Re: [PATCH v7] mm: slub: move sysfs slab alloc/free interfaces to debugfs To: Vlastimil Babka , cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, greg@kroah.com, glittao@gmail.com Cc: vinmenon@codeaurora.org References: <1621928285-751-1-git-send-email-faiyazm@codeaurora.org> <86d843f0-bbef-7c3b-6b6a-5d6b32434bee@suse.cz> From: Faiyaz Mohammed Message-ID: Date: Mon, 31 May 2021 16:37:47 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6297F4202A15 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=mg.codeaurora.org header.s=smtp header.b=Hmv78EEX; spf=pass (imf10.hostedemail.com: domain of bounce@mg.codeaurora.org designates 69.72.43.7 as permitted sender) smtp.mailfrom=bounce@mg.codeaurora.org; dmarc=none X-Rspamd-Server: rspam04 X-Stat-Signature: 1idscmwign6dqg8iz4hq1d1nx47sgju1 X-HE-Tag: 1622459270-70815 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 5/31/2021 3:25 PM, Vlastimil Babka wrote: > On 5/31/21 8:55 AM, Faiyaz Mohammed wrote: > >>> I don't see any of the symlinks under /sys/kernel/debug/slab/, so I think the >>> aliases handling code is wrong, and I can see at least two reasons why it could be: >>> >> >> I think I missed one thing, when CONFIG_SLUB_DEBUG_ON enable or >> slub_debug is pass through command line __kmem_cache_alias() will return >> null, so no symlinks will be created even if CONFIG_SLAB_MERGE_DEFAULT >> is enable and to store user data we need to enable CONFIG_SLUB_DEBUG_ON >> or pass slub_debug through command line. > > So you're saying that caches with SLAB_STORE_USER can never be aliases as the > merging logic will prevent merging with any debug flag, including STORE_USER. So > if we ignore aliases, it means we will not create the debugfs files for caches, > where opening the files would just return error, so we don't lose anything by > not creating the files in the first place. > > In that case, for consistency I would recommend to skip debugfs creation for all > caches without SLAB_STORE_USER (even if the caches are not an alias). I think we > can make this decision now as it's a whole new debugfs subtree so we don't break > any pre-existing code. > Hmmm, I think yes we can skip debugfs creation for all cache without SLAB_STORE_USER flag set instead of returning error after opening of file. I will do the change in next patch version. Thanks and regards, Mohammed Faiyaz