From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 604A2C433F5 for ; Tue, 19 Apr 2022 18:43:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D99AC6B0071; Tue, 19 Apr 2022 14:43:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D494A6B0073; Tue, 19 Apr 2022 14:43:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C120A6B0074; Tue, 19 Apr 2022 14:43:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id B3CF86B0071 for ; Tue, 19 Apr 2022 14:43:44 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 791CB226E0 for ; Tue, 19 Apr 2022 18:43:44 +0000 (UTC) X-FDA: 79374502368.20.5788784 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf06.hostedemail.com (Postfix) with ESMTP id 0DD66180014 for ; Tue, 19 Apr 2022 18:43:42 +0000 (UTC) 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-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 0DD66180014 X-Stat-Signature: y1x64j5hfc1k69qm7h4i1c7ndxfz18et Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=J32CmAVJ; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf06.hostedemail.com: domain of roman.gushchin@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev X-HE-Tag: 1650393822-78656 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.