linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: REQ_PRIO use
@ 2018-11-20  6:07 Damien Le Moal
  2018-11-20  9:39 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Le Moal @ 2018-11-20  6:07 UTC (permalink / raw)
  To: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	dm-devel@redhat.com

include/linux/blk_types.h states that REQ_PRIO intended use is to boost a
request priority in cfq:

__REQ_PRIO,             /* boost priority in cfq */

REQ_PRIO is used by different file systems (ext4, btrfs, f2fs, gfs2, erofs) and
a couple of dm drivers (bcache and dm-zoned), but nobody actually acts on the
flag being set, certainly not cfq since this scheduler is now gone in 4.21.

I think this mandates some cleanups. I can see 2 options:
1) Have bfq act on this flag
2) Remove it entirely and replace its use with explicit setting of BIOs priority
values, either directly through the struct bio bi_ioprio field or indirectly
through setting the issuer task contecxt iopriority or eventually by adding a
bi_ionice field to struct bio. For instance, ext4 sets its journald task context
I/O priority, which result in all BIOs issued by that task to get an explicit
I/O priority value.

If option (2) is the preferred choice, looking at the current use of REQ_PRIO,
removing this flag does not seem difficult at all. In this case, changes by the
current users to explicitly set BIO I/O priorities can be done later with
different patches.

Comments, thoughts ?

Best regards.

-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-21 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-20  6:07 RFC: REQ_PRIO use Damien Le Moal
2018-11-20  9:39 ` Christoph Hellwig
2018-11-21  2:37   ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).