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]
Message-ID: <Y7cB7f98+PNdXUnj@slm.duckdns.org>
Date:   Thu, 5 Jan 2023 06:59:25 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Yu Kuai <yukuai1@...weicloud.com>
Cc:     Michal Koutný <mkoutny@...e.com>,
        josef@...icpanda.com, axboe@...nel.dk, cgroups@...r.kernel.org,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        yi.zhang@...wei.com, yangerkun@...wei.com,
        "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH] blk-cgroup: fix missing pd_online_fn() while activating
 policy

On Thu, Jan 05, 2023 at 09:52:29PM +0800, Yu Kuai wrote:
> Hi,
> 
> 在 2023/01/05 18:45, Michal Koutný 写道:
> > On Thu, Jan 05, 2023 at 09:43:02AM +0800, Yu Kuai <yukuai1@...weicloud.com> wrote:
> > > This is based only on code review, currently the only negative effects
> > > is that root blkg from blk-throtl won't call pd_online_fn().
> > 
> > Good, that's a NOP and there are no other uses of pd_online_fn.
> > 
> > I wonder are the separate pd_init_fn and pd_online_fn callbacks
> > necessary today?
> 
> I think online can combine to init, consider that only blk-throttle
> implement pd_online_fn(), but I'm not sure...
> 
> It seems to me the policies(bfq, iocost...) seem don't honor how pd
> apis works: alloc->init->online->offline->free, bfq combines online to
> init, iocost combines offline to free, ...

So, the distinction between alloc and online is that a pd which gets
allocated may be freed without ever going online if later allocations fail.
This is following cgroup init/exit pattern. Maybe it's a bit too elaborate
but the distinction is meaningful, at least in principle.

What seems truly spurious is pd_init_fn(). All that pd_init_fn() can do
should be achievable between pd_alloc_fn() and pd_online_fn(). The overlap
seems at least partially historical and we used to have pd_exit_fn() too.
So, yeah, getting rid of pd_init_fn() would be a nice first step.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ