lkml.org 
[lkml]   [2022]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH rfc 0/5] mm: introduce shrinker sysfs interface
On Tue, Apr 19, 2022 at 11:25:49AM -0700, Andrew Morton wrote:
> On Tue, 19 Apr 2022 10:52:44 -0700 Roman Gushchin <roman.gushchin@linux.dev> 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.

\
 
 \ /
  Last update: 2022-04-19 20:44    [W:0.121 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site