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: <aOxxBS8075_gMXgy@infradead.org>
Date: Sun, 12 Oct 2025 20:24:53 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Fengnan Chang <changfengnan@...edance.com>
Cc: axboe@...nel.dk, viro@...iv.linux.org.uk, brauner@...nel.org,
	jack@...e.cz, asml.silence@...il.com, willy@...radead.org,
	djwong@...nel.org, hch@...radead.org, ritesh.list@...il.com,
	linux-fsdevel@...r.kernel.org, io-uring@...r.kernel.org,
	linux-xfs@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] block: enable per-cpu bio cache by default

On Sat, Oct 11, 2025 at 09:33:12AM +0800, Fengnan Chang wrote:
> +	opf |= REQ_ALLOC_CACHE;
> +	if (bs->cache && nr_vecs <= BIO_INLINE_VECS) {
> +		bio = bio_alloc_percpu_cache(bdev, nr_vecs, opf,
> +					     gfp_mask, bs);
> +		if (bio)
> +			return bio;
> +		/*
> +		 * No cached bio available, bio returned below marked with
> +		 * REQ_ALLOC_CACHE to participate in per-cpu alloc cache.
> +		 */
> +	} else

> +		opf &= ~REQ_ALLOC_CACHE;

Just set the req flag in the branch instead of unconditionally setting
it and then clearing it.  

> +	/*
> +	 * Even REQ_ALLOC_CACHE is enabled by default, we still need this to
> +	 * mark bio is allocated by bio_alloc_bioset.
> +	 */
>  	if (rq->cmd_flags & REQ_ALLOC_CACHE && (nr_vecs <= BIO_INLINE_VECS)) {

I can't really parse the comment, can you explain what you mean?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ