Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1403513ioo; Fri, 27 May 2022 08:02:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytQcZNAY74+yUy7FMDINCw8B+xoGseCRozJPpaNxBAGV7oRrdcOJLUW3FGVudhGcAaJFsX X-Received: by 2002:a17:907:3f1c:b0:6ff:2bc2:6ac2 with SMTP id hq28-20020a1709073f1c00b006ff2bc26ac2mr6490425ejc.696.1653663744338; Fri, 27 May 2022 08:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653663744; cv=none; d=google.com; s=arc-20160816; b=dd/CiJhAglw8hnIcCoOwpdCOLlAUbeWZqkeDYiN5iIwSwCqh/+OEU36gx+yDjM0fDb Sv4WiXfjkv6YwTkfGI0Grxl3MSz23CDTDbD+Xi/7jOBpzZwzNQ290p5huKF4bbJvkDNx OP9UhcTQWFR94wBY5sXcyESuN5yGRuot5kpiA6Rl/yKBckz7fLUOeEPVc2HM33Y5vmC7 kirCoXb35Nys8MGML5eM1ZTqA9nf7TW04ZMEnZyzgS23kRbBAH236PRN6RqRjLaNDtLU 3+WXejERVMaHf0CdrX0df32uC0X5duAJmu6RWByLJb/O93qv1o1kjGcmu+ZaCM2DbYEI l0Hg== 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:date:dkim-signature; bh=kGL6h5v+Jr74W1Yhb+Bf5QfP2tpx/zeVbCOX59bHIDg=; b=cnJhzfcSJuY+3WmVKQlPM0YigtMgTK6W5P7XK/iONGLgwxOjBUpI+r5YmAPqaYnjKG wK9EsU8nNDJadkhkaHdk8zY9cQtKzW50ipxg+e2xLHnpWWYxdnaeiccly8Ids99ZfmAA sKHxQUbtcO8x0qyZuiUCXft/qy2hzmezuuElh6ioHJ680DgcGINtWbrAJqJFpvz2mEzD juxz85J9ulfu2WnfxRTnmxsHYCd/2I9MoU+RZcXAhuDD/o/430YvUqWcj/j5F3PVNlLc kaIAlv3zvVkjwJHHQXGqVYuOFTnPPA6CxCbg5jclk3JB/vZfnfWw2t6FPhlqmI25hSLR ZVPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=6XMugYmG; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a05640226cc00b0042b354fefcesi5026853edd.271.2022.05.27.08.01.56; Fri, 27 May 2022 08:02:24 -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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=6XMugYmG; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345884AbiEZB64 (ORCPT + 99 others); Wed, 25 May 2022 21:58:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345891AbiEZB6y (ORCPT ); Wed, 25 May 2022 21:58:54 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A228BCE85 for ; Wed, 25 May 2022 18:58:49 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id o10-20020a17090a4e8a00b001df2fcdc165so3205994pjh.0 for ; Wed, 25 May 2022 18:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kGL6h5v+Jr74W1Yhb+Bf5QfP2tpx/zeVbCOX59bHIDg=; b=6XMugYmG+RUzN2StHKzTsP39OPJNYLJCQObzG+2FFmneHpobDjdWIRdY3HskteR7ZQ +y9BoEU+++ihSyELnRUGFnA1pD6EW3RxiDJ3MuSe7G2PtTnSSz9kmnwqfssiHH2p8MP1 inMrblr/tC0RwZDvcfd3jiKeO7VFs9OLhILAiTiKo3dBmGwhwXkQyear1mwraKi36zNo B3vjRDg9YiY7Q1G5L370pM7cScF2zE4oRBjW7I9piLH3jWTwjNzaEqTKaD61xg3cs/lD QbrnO2HfvtvCc+K1/QIK+x85eom8nR7L9KgyQJUGz4/KGDkstI0/Ui2TwMCNdlbuVF3n EMnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kGL6h5v+Jr74W1Yhb+Bf5QfP2tpx/zeVbCOX59bHIDg=; b=cWRVxIRJm+M8kaMxQ9nhvXe6HCFNJiSUC4+VQ3ul0bbHq2j+VMgyX/eG3c14TNVmnz UR+AFt6K5ZeYycPVhruioVhC3uIIh6+uOKvbIG7r9Wmc5o5Y8IZN3Kg2YEWJYRTDXttQ /mVbFGqPuE/T733/XbR7hC6tTpbqzUCkSF7jsiwQ20JI9Oibo7nquMwRqSkSSc25YSQH KD5w9VVMYMJQN3wpgg5xGKDehp2BWVZgPLgRbVSr/hi0Dz0VS5WID1fP/mGdBQzazQ5Y 49tLlda15n1lslruUx5TTQWnN8lh6os3ZHkOydbfo2aSCmx8NxNwK/tCrpjEdeMWe/zF FRrA== X-Gm-Message-State: AOAM531XwrAxabk11POXPlWqYFxe3toeT34JCVopoPgq0RoeeKIL1nQc oO8KKY1ZbtcmI/n7MDqofmWtkw== X-Received: by 2002:a17:903:22cd:b0:161:be20:577 with SMTP id y13-20020a17090322cd00b00161be200577mr36110298plg.54.1653530328625; Wed, 25 May 2022 18:58:48 -0700 (PDT) Received: from localhost ([2408:8207:18da:2310:c40c:3e14:bb57:48be]) by smtp.gmail.com with ESMTPSA id 26-20020a63195a000000b003c6ab6ba06csm188772pgz.79.2022.05.25.18.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 18:58:48 -0700 (PDT) Date: Thu, 26 May 2022 09:58:42 +0800 From: Muchun Song To: Roman Gushchin Cc: Andrew Morton , linux-mm@kvack.org, Dave Chinner , linux-kernel@vger.kernel.org, Kent Overstreet , Hillf Danton , Christophe JAILLET Subject: Re: [PATCH v4 2/6] mm: shrinkers: introduce debugfs interface for memory shrinkers Message-ID: References: <20220525202600.2910982-1-roman.gushchin@linux.dev> <20220525202600.2910982-3-roman.gushchin@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220525202600.2910982-3-roman.gushchin@linux.dev> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Wed, May 25, 2022 at 01:25:56PM -0700, Roman Gushchin wrote: > This commit introduces the /sys/kernel/debug/shrinker debugfs > interface which provides an ability to observe the state of > individual kernel memory shrinkers. > > Because the feature adds some memory overhead (which shouldn't be > large unless there is a huge amount of registered shrinkers), it's > guarded by a config option (enabled by default). > > This commit introduces the "count" interface for each shrinker > registered in the system. > > The output is in the following format: > ... > ... > ... > > To reduce the size of output on machines with many thousands cgroups, > if the total number of objects on all nodes is 0, the line is omitted. > > If the shrinker is not memcg-aware or CONFIG_MEMCG is off, 0 is > printed as cgroup inode id. If the shrinker is not numa-aware, 0's are > printed for all nodes except the first one. > > This commit gives debugfs entries simple numeric names, which are not > very convenient. The following commit in the series will provide > shrinkers with more meaningful names. > > Signed-off-by: Roman Gushchin > Reviewed-by: Kent Overstreet Acked-by: Muchun Song Thanks.