Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4610622rwb; Tue, 8 Aug 2023 10:56:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOXdHB3+iT7udhLHYE4BblntbhayWO49Q3lXk93c+Njo+0kWgPZIIn50AiRT3iixnqfwW5 X-Received: by 2002:a05:6a21:4841:b0:105:6d0e:c046 with SMTP id au1-20020a056a21484100b001056d0ec046mr225569pzc.26.1691517394629; Tue, 08 Aug 2023 10:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691517394; cv=none; d=google.com; s=arc-20160816; b=1AjdeEdbIpMd+T/il1HMWRp6w/upczEdS35FdRgeDSQRnWc9uOQQJSyANdMdQXoyxx LppCelWs8YVYvH8jUMVqMxWq2NciyVwNe+xLBhwqgBmcN0pLzGHvJ594tYnmv0an+4ly qMqfROVXWEOXlWKJ0cOaN3UlAagdBGOxC6ZWOwOSgdg6ndI3fi4mWv08WqUFiQb514lh hRNiviNGMFs2qyH640kLpL0Gw0rawXK5d+IoNnyoZO19HHznml5YVFuBnmh7AAzzrB53 rhOSJmM8MXP90kHr1rl2b+X6UtLV1TNA7B+Clqhpi6RYJ6aqEnH+v4AI5UxTrDbJGkcQ NANw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=sez3/qKAzyH76xRy/KhqNgZqSUAZnWdnTT8oqdhcXFU=; fh=n8CxpPMyQ/Iikm8c7HUJGCetFppAejXraY6d9HWe8nM=; b=D8//E7PJSdeU+ELRMahGpusCivQTFOYrf5+dOq3UNRSzBbdMzel9IZG7r96JTRDzF4 +au/wVosiassOyXW8Cx3pqNNfglsHzb+jgv0le06LsOqNpXj0ktsWRU/Lv1vambqKhKh HefbMaRXRWEs0Pb6Em6Epa6FdxEuDqvBuplzrumV1YTfhcOZ4yuX4yPIkUtP4nCH4Hks dvn5jytqSpY54YKUl36jtUiSGdsP8skhSy4xwZIlOXKKv1mNwLj5fOexUyWET+S3sfvm EdF+Q3xomF1yKBPYnxXduJHPpZTN9zL8WEfWC1fAKZSIiIS5gja9qK4CegR0V8m1EnLl 5U5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Cp0f1StK; 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=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce11-20020a056a002a0b00b006870c1ea846si7535029pfb.281.2023.08.08.10.56.22; Tue, 08 Aug 2023 10:56:34 -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=@linux.dev header.s=key1 header.b=Cp0f1StK; 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=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232281AbjHHQOb (ORCPT + 99 others); Tue, 8 Aug 2023 12:14:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232142AbjHHQNL (ORCPT ); Tue, 8 Aug 2023 12:13:11 -0400 Received: from out-124.mta0.migadu.com (out-124.mta0.migadu.com [91.218.175.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74FD77EEA for ; Tue, 8 Aug 2023 08:47:18 -0700 (PDT) Date: Mon, 7 Aug 2023 20:59:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1691467205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sez3/qKAzyH76xRy/KhqNgZqSUAZnWdnTT8oqdhcXFU=; b=Cp0f1StKAVL+rMJfbIbWcxpNVTgUYc6wQudKaze3wIjc5BC5XVXMk0mpSZhp3Wt/mYHEee YI4Sm7tEAnDW2LteipyOYEHK1B+WOjylDTJ5aOQDsBoX/ClxtVQAA2GoO9Q+OAfd27HcbQ 9S3NIwPXnMBZ/gyDlHHFOXzZB1IjJl0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: xiongwei.song@windriver.com Cc: 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 Subject: Re: [PATCH] mm/memcontrol: add tips for kmem.slabinfo Message-ID: References: <20230808022229.1560559-1-xiongwei.song@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment In-Reply-To: <20230808022229.1560559-1-xiongwei.song@windriver.com> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DATE_IN_PAST_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 08, 2023 at 10:22:29AM +0800, xiongwei.song@windriver.com wrote: > 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(CONFIG_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 kernel 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. Thanks!