Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4639757rwb; Tue, 8 Aug 2023 11:20:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBYs39SF+5KfI2uXaLuItNodNJNRndQGhd+nbbY0AoFGMQciXlylbwdomS4BPdY263eYnq X-Received: by 2002:a05:6a00:390b:b0:680:98c:c593 with SMTP id fh11-20020a056a00390b00b00680098cc593mr429240pfb.7.1691518829577; Tue, 08 Aug 2023 11:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691518829; cv=none; d=google.com; s=arc-20160816; b=H2EjDlc3Sq5O0hCN3l3SICk1aNiVhr13fBZSh9grYOo9HUW5wXu/pCc0ki1L1a86vo vETxFTuapZ73G0yxD1wlh6y0ZH3UB4hJDGbb1+yhPzL2GMGTnoT5hxGVBLgfgSWCv+ha Sv8upKnVAioFqcFgFuNN3hbQ+8ypeT/HSCWIFVGFeLBfG2g7WSU84gKpuSwpi5NB2p7y 8LICvzHuvpFgZXXQ/S6yNZMVvSR6D+WkabJ2rHXEriFx9Hie8Vgff7w9euccVTDVLzMq /7Trcv6VCrh9Fw7CuEDbLj99IOsM/jYyLt3e+IQFCNCpWNYZgiLg9Awx12LiG9ZCwWPK ZGQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=n17U5qh0OrK3kvBv9V9L+D0ClJ7otAlPJK+8puyUKR0=; fh=1IWaX/vkjl2l2/oZTrUqZqxjYGk8Gp4y9leTZyTjLMM=; b=fHcQqxhlp/ZHIWFB+hG5XgOyDLQL6oAL/gDWlvRVzwusAuxJZnpYsjb+0F3iMfnRAG Sm7cyT+8eJBQd1abpnNyJt/+9/IMM/H9NzCIOlxy5kp7AzGY87QU8XquXMjOvrWZPt6N C5O8Rf/+RQJ+hnyxC4KbNzNq7rq59q6IW3j4SvU4tJaLtmLmOpWR5Y7suRWMl/Ij38pd yVF86omWRNSUFSJ6havv9QmF1Oc/5hwhrjyFjRKiB5fFtv5DG2+jztS+AMHTDbvL+PyU afWF7M+GojQ1MQBRZF9BgpfgMELIxa7Kan3CcD8Lfpk5s/cfnlz+sXJxqVrHBYdZ2k52 IbXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=R9MM9qtc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020a056a000cd400b0064d3e917a90si7912348pfv.180.2023.08.08.11.20.16; Tue, 08 Aug 2023 11:20:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=R9MM9qtc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235221AbjHHSBd (ORCPT + 99 others); Tue, 8 Aug 2023 14:01:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235222AbjHHSBC (ORCPT ); Tue, 8 Aug 2023 14:01:02 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2463C12597; Tue, 8 Aug 2023 09:28:02 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-686bea20652so5799122b3a.1; Tue, 08 Aug 2023 09:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691512029; x=1692116829; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=n17U5qh0OrK3kvBv9V9L+D0ClJ7otAlPJK+8puyUKR0=; b=R9MM9qtcdWK6ALzoyjStuJ1cKn4gHm0nKPRoq9v6WU//494PvRCVoizlwxpSB7Drq5 PkpAsBRdO6kebLLBV1eO3x8N1gVnQMrZ96KIGwypJXK3mt5n4XqxY2L9ouNEbcmUSMdQ VW6eL2ZF8SgJCGeyLRpuzQIWeHbFUXs8EnlA3vW4A9XSXKo2pNMZ8gz327rsBfsHFAAM vy3gZkSk82+C9oXJjCcdjYS+j3qB0TT4CyfrGWM5SOKmsI+XTdIinG4Cm8a3W5yOZHD1 +zq6pbc2BaRGIMvcMyxTwne37QIixGwvDkGfIsuWzccKIJzntyBs3XRQlXk3yCjSGQYq BIfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691512029; x=1692116829; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n17U5qh0OrK3kvBv9V9L+D0ClJ7otAlPJK+8puyUKR0=; b=AjJA/KR4JA2aYQJ7eC7x60Zld7rQsO0OlNDtiFIZ3/h89uFbHWUOlCJ3xiWHthU0CF xtY0tyIFz/ftFI7iU2/9JJuSCUi1Dg5wmMS16eQYjenh/tYfTR3Tuu8jKxFs6bbaNdN1 Wh9YQSOddc35l26rug8a9UtJePhUf7Sub/LEwN4HcKUPFIh3k9C3zXlNVYwJ7U0wGtyH QnCYpQvSVUbEFs1+U8ekL0k+VFqYBvVbNgAMjpD92LqyJ8YNbMYcgtivssOFkaJfXkn3 KwobxuEocJyhH/C3F3NryvFJI7AJoy/+mhSvIBETifZgcsQKKzxnLLXc4jzS7ECbGHWb vXHw== X-Gm-Message-State: AOJu0YwApKHDFPbiqf5krx9/b6DpHqzh0bRFESLX90bFwcufBtKO27ad bnvuRmGWuScXu6ibDzOy4IMyd6voPm3L0B46HodYjvPpfUs= X-Received: by 2002:a05:6870:c1cc:b0:1bb:89b1:77b7 with SMTP id i12-20020a056870c1cc00b001bb89b177b7mr15189629oad.16.1691496560111; Tue, 08 Aug 2023 05:09:20 -0700 (PDT) MIME-Version: 1.0 References: <20230808022229.1560559-1-xiongwei.song@windriver.com> In-Reply-To: From: Xiongwei Song Date: Tue, 8 Aug 2023 20:08:57 +0800 Message-ID: Subject: Re: [PATCH] mm/memcontrol: add tips for kmem.slabinfo To: Roman Gushchin Cc: xiongwei.song@windriver.com, hannes@cmpxchg.org, mhocko@kernel.org, shakeelb@google.com, muchun.song@linux.dev, akpm@linux-foundation.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 8, 2023 at 12:00=E2=80=AFPM Roman Gushchin wrote: > > On Tue, Aug 08, 2023 at 10:22:29AM +0800, xiongwei.song@windriver.com wro= te: > > From: Xiongwei Song > > > > No any output from kmem.slabinfo, which is not friendly. Adding > > tips for it. > > > > Signed-off-by: Xiongwei Song > > --- > > mm/memcontrol.c | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > > index e8ca4bdcb03c..58d3bd93890b 100644 > > --- a/mm/memcontrol.c > > +++ b/mm/memcontrol.c > > @@ -5002,10 +5002,8 @@ static ssize_t memcg_write_event_control(struct = kernfs_open_file *of, > > #if defined(CONFIG_MEMCG_KMEM) && (defined(CONFIG_SLAB) || defined(CON= FIG_SLUB_DEBUG)) > > static int mem_cgroup_slab_show(struct seq_file *m, void *p) > > { > > - /* > > - * Deprecated. > > - * Please, take a look at tools/cgroup/memcg_slabinfo.py . > > - */ > > + seq_puts(m, "This file is deprecated.\n" > > + "Please use tools/cgroup/memcg_slabinfo.py, which is in k= ernel source.\n"); > > It'll break the ABI. > The only possible option here is to use WARN_ON_ONCE(), which will print = once to dmesg. > But honestly I'm not sure we need it. Ok, thanks for the comments. > > Thanks! >