Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2465682pxj; Mon, 31 May 2021 02:57:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj6R/8mRZNMHIBvSzHMmPXCehMc7QPDYn2oI2hQaikzNBW0rdhSy6ip8Md7iq4BM+p6LFr X-Received: by 2002:a05:6602:340a:: with SMTP id n10mr5915476ioz.90.1622455023787; Mon, 31 May 2021 02:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622455023; cv=none; d=google.com; s=arc-20160816; b=QCvxTBFXSwC5JtB9lQBKpcGxc0s0PhRx09qBFmeywWUf1cKQp59vNOhPUGjzvLOmwq cuhTYYV9tPCfxJMC/lfhrtYZWRWphFGIqIeoHaCyEF+TgDMiwXfT0Rn51ZLdYlRL5Yh/ LB5LSG+3KXbgGzigXJsQYZx7mzlewXIu3QGRPVxSFFO4OwcuR0eGkUjhRlXLL4GX8dS5 2Hlt0M1nQX+XoC925ojeYLFKLJv8Cw22iOl27UVADpaawllpWDSas2ni60SeNgk8ivu2 KOwf8x44p+Czc+DjYnAI2lASH2SuszDHgc85lNZi+1wTBsSKixBFFmK5vd82uSRkIVYw cLog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=vlh6DDaopcTSgBwlUip1FcUMxp4Lt8TiZSFROJe92wc=; b=GwVNKKj68a9NUAHGoKM4SWvf2MEBxEqZoL6Xl/o/zjJwJEwxSGgBtpQkQPgsHD/wJU ImEPCP60kS4/68TOHv5fg+82VvFFjTD2OUCMViBFp6J9RNfxeTJaMpsu5xu1xhaPFCsv xEiPOHsnHaQoKcWV2ae4LmmkVLyCFZhMGCQTWzEADxvZpVPbSsz/qN0+NavAo2PkcRov jWvizq/rgIgYyFsKHQkCwxx7NveUQVMHdHN12co2ApTJYdFdQWJ/OwCt/gXPtFHpEaqm 26FlJurAZG9lQgRt6jfqfux3IGYiWrzmR0/6AEhE5Kv9MlVxpTeKFNT952CZrybZQd99 W+UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=RlvjapcM; dkim=neutral (no key) header.i=@suse.cz; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=RlvjapcM; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=p9h8vmKk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si17005522ioh.58.2021.05.31.02.56.50; Mon, 31 May 2021 02:57:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=RlvjapcM; dkim=neutral (no key) header.i=@suse.cz; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=RlvjapcM; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=p9h8vmKk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231144AbhEaJ4o (ORCPT + 99 others); Mon, 31 May 2021 05:56:44 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:40640 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230518AbhEaJ4n (ORCPT ); Mon, 31 May 2021 05:56:43 -0400 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 Content-Transfer-Encoding: 8bit Authentication-Results: imap.suse.de; none X-Spam-Level: X-Spam-Score: 0.00 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)[] X-Spam-Flag: NO Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.