lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 24 Jul 2019 00:24:41 +0300
From:   Konstantin Khlebnikov <koct9i@...il.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-mm@...ck.org, Cgroups <cgroups@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Tejun Heo <tj@...nel.org>, Jens Axboe <axboe@...nel.dk>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>
Subject: Re: [PATCH] mm/backing-dev: show state of all bdi_writeback in debugfs

On Tue, Jul 23, 2019 at 11:07 PM Andrew Morton
<akpm@...ux-foundation.org> wrote:
>
> On Tue, 23 Jul 2019 15:49:32 +0300 Konstantin Khlebnikov <khlebnikov@...dex-team.ru> wrote:
>
> > Currently /sys/kernel/debug/bdi/$maj:$min/stats shows only root bdi wb.
> > With CONFIG_CGROUP_WRITEBACK=y there is one for each memory cgroup.
> >
> > This patch shows here state of each bdi_writeback in form:
> >
> > <global state>
> >
> > Id: 1
> > Cgroup: /
> > <root wb state>
> >
> > Id: xxx
> > Cgroup: /path
> > <cgroup wb state>
> >
> > Id: yyy
> > Cgroup: /path2
> > <cgroup wb state>
>
> Why is this considered useful?  What are the use cases.  ie, why should
> we add this to Linux?
>
> > mm/backing-dev.c |  106 +++++++++++++++++++++++++++++++++++++++++++++++-------
> > 1 file changed, 93 insertions(+), 13 deletions(-)
>
> No documentation because it's debugfs, right?
>
> I'm struggling to understand why this is a good thing :(.  If it's
> there and people use it then we should document it for them.  If it's
> there and people don't use it then we should delete the code.
>

Well. Cgroup writeback has huge internal state:
bdi_writeback for each pair (bdi, memory cgroup ) which refers to some
blkio cgroup.
Each of them has writeback rate estimation, bunch of counters for
pages and flows and so on.
All this rich state almost completely hidden and gives no clue when
something goes wrong.
Debugging such dynamic structure with gdb is a pain.

Also all these features are artificially tied with cgroup2 interface
so almost nobody use them right now.

This patch extends legacy debug manhole to expose bit of actual state.
Alternative is exactly removing this debugfs file.

I'm using this debugfs interface for croups and find it very useful:
https://lore.kernel.org/patchwork/patch/973846/
but writeback has another dimension so needs own interface.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ