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 80B4EC47082 for ; Mon, 31 May 2021 09:55:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F01B8611AC for ; Mon, 31 May 2021 09:55:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F01B8611AC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 842D96B0036; Mon, 31 May 2021 05:55:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7CB906B006E; Mon, 31 May 2021 05:55:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D0036B0070; Mon, 31 May 2021 05:55:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0048.hostedemail.com [216.40.44.48]) by kanga.kvack.org (Postfix) with ESMTP id 27CAD6B0036 for ; Mon, 31 May 2021 05:55:05 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B5B0D181AEF1F for ; Mon, 31 May 2021 09:55:04 +0000 (UTC) X-FDA: 78201067728.14.8F670B0 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf10.hostedemail.com (Postfix) with ESMTP id 8C54441AD7B2 for ; Mon, 31 May 2021 09:54:53 +0000 (UTC) Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BDB272191F; Mon, 31 May 2021 09:55:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1622454902; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vlh6DDaopcTSgBwlUip1FcUMxp4Lt8TiZSFROJe92wc=; b=RlvjapcMXhOjtT9Z7TZeKhC8Vw2bcEhEuQGCwdiPq1tlvtJNMn/eLHTkYcek0qtj+FE6hR vApnpTk4STPpxXJrw+WnCxj39CPQ9Ie9szCuxHOlhiuSpYGANxdE+mmKrC/+r+54T7yHoI 3/YTik1saqGz4m+P+ipZ093Gbl9b13Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1622454902; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vlh6DDaopcTSgBwlUip1FcUMxp4Lt8TiZSFROJe92wc=; b=p9h8vmKkWU90nKTUhZVz5JVHzFIL8Y5mj8H2N1/3eBQArCWlheyp7Uxk+CSNclPReNf+1T zyq7opf4c2RYVdBA== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 9032E118DD; Mon, 31 May 2021 09:55:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1622454902; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vlh6DDaopcTSgBwlUip1FcUMxp4Lt8TiZSFROJe92wc=; b=RlvjapcMXhOjtT9Z7TZeKhC8Vw2bcEhEuQGCwdiPq1tlvtJNMn/eLHTkYcek0qtj+FE6hR vApnpTk4STPpxXJrw+WnCxj39CPQ9Ie9szCuxHOlhiuSpYGANxdE+mmKrC/+r+54T7yHoI 3/YTik1saqGz4m+P+ipZ093Gbl9b13Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1622454902; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vlh6DDaopcTSgBwlUip1FcUMxp4Lt8TiZSFROJe92wc=; b=p9h8vmKkWU90nKTUhZVz5JVHzFIL8Y5mj8H2N1/3eBQArCWlheyp7Uxk+CSNclPReNf+1T zyq7opf4c2RYVdBA== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id VWNrInaytGCpZwAALh3uQQ (envelope-from ); Mon, 31 May 2021 09:55:02 +0000 To: Faiyaz Mohammed , 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: Vlastimil Babka Subject: Re: [PATCH v7] mm: slub: move sysfs slab alloc/free interfaces to debugfs Message-ID: Date: Mon, 31 May 2021 11:55:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; 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 X-Spamd-Result: default: False [0.00 / 100.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[11]; FREEMAIL_TO(0.00)[codeaurora.org,linux.com,kernel.org,google.com,lge.com,linux-foundation.org,kvack.org,vger.kernel.org,kroah.com,gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=RlvjapcM; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=p9h8vmKk; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=RlvjapcM; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=p9h8vmKk; dmarc=none; spf=pass (imf10.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 8C54441AD7B2 X-Stat-Signature: i1pc95tngjdsazpgbox8mnei8mf4oipe X-HE-Tag: 1622454893-252428 Content-Transfer-Encoding: quoted-printable 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/21 8:55 AM, Faiyaz Mohammed wrote: >> I don't see any of the symlinks under /sys/kernel/debug/slab/, so I th= ink the >> aliases handling code is wrong, and I can see at least two reasons why= it could be: >>=20 >=20 > I think I missed one thing, when CONFIG_SLUB_DEBUG_ON enable or > slub_debug is pass through command line __kmem_cache_alias() will retur= n > 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_U= SER. So if we ignore aliases, it means we will not create the debugfs files for c= aches, where opening the files would just return error, so we don't lose anythin= g 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 t= hink we can make this decision now as it's a whole new debugfs subtree so we don'= t break any pre-existing code.