Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp942610pxb; Fri, 22 Apr 2022 14:58:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzj6t1xOyvxGTyTW1yLjpBrnbFa4wF/R3sSS5CG5ZUF92rXIfVco9/tGWwf9RrILbRtleu4 X-Received: by 2002:a17:902:ab8e:b0:158:a3ca:3dfc with SMTP id f14-20020a170902ab8e00b00158a3ca3dfcmr6507830plr.62.1650664734905; Fri, 22 Apr 2022 14:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650664734; cv=none; d=google.com; s=arc-20160816; b=eFpg+m1f80pSUS6c3aJLazSX/A45YXEORhxa1w7UlHBkkkJGelcHX2Bx9w3Q0KrewP krWpnmvwlaqiCKdQ0n1R6SF3NCAPrbZgiyNf2d0qVQbIVsFo2NBu4YmbkKQPbyjQA9X5 WSrC6a9ueo3iHLNpz93dfM9epEmp2qrRPuieO+l5WJovdmLPAiuwR/jozD6WWHDKxyGe jEd5HhADSLPUuU0gjKdFIqx1XTBOf0OAbqsqRHbZ00v+nojGkCyICyUG5PUKaazxg4Hn eFNvBKTgyNGSsw7lMgkBkf2aKKwa3ot5HhGOG3/jEhSvuGLltpL+P0HomiXcDlEHPOfZ /TJQ== 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=GFIxKYdHlMseSO1tlyqNC0Z7+2W1DV8pV6RMcsFlSN4=; b=nlm0KqzXskX1OvntpNkaIoRw7bpdbVdpKkBXZ8fSaTiUGvMz8PvSZR5pzT0XKlySJ2 zZdhZGEchapnG2FT01dJK82qKGkyMVFI2Umv8dVKieoJmJcLTbRGeaX/y3yPl2SbSDil 6Z09eEfHP4TCbJJlWcKiJvkinoDTI4ivZX83QPQvp1fvvnZKZp9iCfKHwZg9fy79Yq8J tP9gIKZ/ha0skyCOqTGrRxFJCvZT0TjyDj99cVKoh6dcvSb+afuzT7+3Mb29vPTkbo1I e8k534Isdsj5GMDVWjVaUr5P5d3m4cthAoMywWKufWzT+Kivip1ex6xStziWH3Nblqii SHaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=J32CmAVJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l13-20020a63f30d000000b0039da2d3f9fesi9105738pgh.646.2022.04.22.14.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 14:58:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=J32CmAVJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 991CD36C928; Fri, 22 Apr 2022 13:06:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353414AbiDSSqf (ORCPT + 99 others); Tue, 19 Apr 2022 14:46:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353671AbiDSSq1 (ORCPT ); Tue, 19 Apr 2022 14:46:27 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DE8F3DDF5 for ; Tue, 19 Apr 2022 11:43:43 -0700 (PDT) Date: Tue, 19 Apr 2022 11:43:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1650393821; 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=GFIxKYdHlMseSO1tlyqNC0Z7+2W1DV8pV6RMcsFlSN4=; b=J32CmAVJlieNJwRkipeOQWjw09E4O5dhfP8kD80buHhuD7SiitrR8Jm5naMrbQQDIam+2T eNj2mvjCXN7eg2zF67LuKwz3ReZjWfv38baEg6aS2TZo3McQQ2ymVLj7LutgD14PNTtDlV RqXuecTfdJigZkk2ZgjXT5HvBG6tLqM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Andrew Morton Cc: linux-mm@kvack.org, Dave Chinner , linux-kernel@vger.kernel.org, Johannes Weiner , Michal Hocko , Shakeel Butt , Yang Shi Subject: Re: [PATCH rfc 0/5] mm: introduce shrinker sysfs interface Message-ID: References: <20220416002756.4087977-1-roman.gushchin@linux.dev> <20220418212709.42f2ba15e00999bb57086b27@linux-foundation.org> <20220419112549.a42f1d86b025112d3a3aaf8c@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220419112549.a42f1d86b025112d3a3aaf8c@linux-foundation.org> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE 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, Apr 19, 2022 at 11:25:49AM -0700, Andrew Morton wrote: > On Tue, 19 Apr 2022 10:52:44 -0700 Roman Gushchin wrote: > > > > Unclear. At the end of what output? > > > > This is how it looks like when the output is too long: > > > > [root@eth50-1 sb-btrfs-24]# cat count_memcg > > 1 226 > > 20 96 > > 53 811 > > 2429 2 > > 218 13 > > 581 29 > > 911 124 > > 1010 3 > > 1043 1 > > 1076 1 > > 1241 60 > > 1274 7 > > 1307 39 > > 1340 3 > > 1406 14 > > 1439 63 > > 1472 54 > > 1505 8 > > 1538 1 > > 1571 6 > > 1604 39 > > 1637 9 > > 1670 8 > > 1703 4 > > 1736 1094 > > 1802 2 > > 1868 2 > > 1901 52 > > 1934 592 > > 1967 32 > > < CUT > > > 18797 1 > > 18830 1 > > We do that in-kernel? Why? That just makes parsers harder to write? > If someone has issues then direct them at /usr/bin/less? It comes from the sysfs limitation: it expects that the output should fit into the PAGE_SIZE. If the number of cgroups (and nodes) is large, it's not always possible. In theory something like seq_file API should be used, but Idk how hard it's to mix it with the sysfs/debugfs API. I'll try to figure this out.