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 Jan 2024 17:35:47 +0800
From: Zhaoyang Huang <huangzhaoyang@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: "zhaoyang.huang" <zhaoyang.huang@...soc.com>, Jens Axboe <axboe@...nel.dk>, 
	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, 
	steve.kang@...soc.com
Subject: Re: [PATCHv2 1/1] block: introduce content activity based ioprio

On Wed, Jan 24, 2024 at 5:20 PM Christoph Hellwig <hch@...radead.org> wrote:
>
> On Wed, Jan 24, 2024 at 04:53:34PM +0800, zhaoyang.huang wrote:
> >  void __bio_add_page(struct bio *bio, struct page *page,
> >               unsigned int len, unsigned int off)
> >  {
> > +     int class, level, hint, activity;
> > +
> > +     class = IOPRIO_PRIO_CLASS(bio->bi_ioprio);
> > +     level = IOPRIO_PRIO_LEVEL(bio->bi_ioprio);
> > +     hint = IOPRIO_PRIO_HINT(bio->bi_ioprio);
> > +     activity = IOPRIO_PRIO_ACTIVITY(bio->bi_ioprio);
> > +
> >       WARN_ON_ONCE(bio_flagged(bio, BIO_CLONED));
> >       WARN_ON_ONCE(bio_full(bio, len));
> >
> >       bvec_set_page(&bio->bi_io_vec[bio->bi_vcnt], page, len, off);
> >       bio->bi_iter.bi_size += len;
> >       bio->bi_vcnt++;
> > +     activity += bio_page_if_active(bio, page, IOPRIO_NR_ACTIVITY);
> > +     bio->bi_ioprio = IOPRIO_PRIO_VALUE_ACTIVITY(class, level, hint, activity);
>
> If you need to touch anything in the block layer I/O path
> you're doign this wrong.  The file system that is submitting the
> I/O needs to be in control of the priorities.
> must not hack the assignment behind the
Please correct me if I am wrong. According to my understanding,
bio(request)'s ioprio is set via either task's scheduler priority or
blkcg's priority during submit_bio, that is, there is no explicit
operation over ioprio from the file system so far. Furthermore, this
commit is actually an add-on feature which is not against the current
way of setting ioprio.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ