Re: [PATCHv4 1/1] block: introduce content activity based ioprio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 26, 2024 at 08:08:00PM +0800, zhaoyang.huang wrote:
> +#ifdef CONFIG_CONTENT_ACT_BASED_IOPRIO
> +#define bio_add_page(bio, page, len, offset)	\
> +	({					\
> +		int class, level, hint, activity;	\
> +		int ret = 0;				\
> +		ret = bio_add_page(bio, page, len, offset);		\
> +		if (ret > 0) {						\
> +			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);		\
> +			activity += (bio->bi_vcnt + 1 <= IOPRIO_NR_ACTIVITY &&		\
> +				PageWorkingset(&folio->page)) ? 1 : 0;			\

I know you didn't even compile this version.

More importantly, conceptually it doesn't work.  All kinds of pages
get added to bios, and not all of them are file/anon pages.  That
PageWorkingset bit might well be reused for other purposes.  Only
the caller knows if this is file/anon memory.  You can't do this here.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux