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  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:   Fri, 31 Aug 2018 16:20:40 -0400
From:   Dennis Zhou <dennisszhou@...il.com>
To:     Josef Bacik <josef@...icpanda.com>
Cc:     Jens Axboe <axboe@...nel.dk>, Tejun Heo <tj@...nel.org>,
        Johannes Weiner <hannes@...xchg.org>, kernel-team@...com,
        linux-block@...r.kernel.org, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Jiufei Xue <jiufei.xue@...ux.alibaba.com>,
        Joseph Qi <joseph.qi@...ux.alibaba.com>
Subject: Re: [PATCH 03/15] blkcg: use tryget logic when associating a blkg
 with a bio

Hi Josef,

On Fri, Aug 31, 2018 at 11:30:08AM -0400, Josef Bacik wrote:
> On Thu, Aug 30, 2018 at 09:53:44PM -0400, Dennis Zhou wrote:
> > diff --git a/block/blk-throttle.c b/block/blk-throttle.c
> > index a3eede00d302..c626e1f7cdcd 100644
> > --- a/block/blk-throttle.c
> > +++ b/block/blk-throttle.c
> > @@ -2129,8 +2129,9 @@ static inline void throtl_update_latency_buckets(struct throtl_data *td)
> >  static void blk_throtl_assoc_bio(struct throtl_grp *tg, struct bio *bio)
> >  {
> >  #ifdef CONFIG_BLK_DEV_THROTTLING_LOW
> > -	if (bio->bi_css)
> > -		bio_associate_blkg(bio, tg_to_blkg(tg));
> > +	/* fallback to root_blkg if we fail to get a blkg ref */
> > +	if (bio->bi_css && bio_associate_blkg(bio, tg_to_blkg(tg)))
> > +		bio_associate_blkg(bio, bio->bi_disk->queue->root_blkg);
> 
> Except if we've already assocated a blkg this is just extra, can we do
> 
> if (bio->bi_css && (bio_associate_blkg(bio, tg_to_blkg(tg)) == -ENODEV))
> 
> to make it clear that we're only attaching it to the root if we failed to attach
> a blkg at all?  Thanks,

Done in v2.

Thanks,
Dennis

Powered by blists - more mailing lists