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] [day] [month] [year] [list]
Message-ID: <322136ff-95f6-49f6-9126-05845f25b4e8@kernel.dk>
Date: Tue, 20 Jan 2026 08:01:52 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Coly Li <colyli@...as.com>, Stephen Zhang <starzhangzsd@...il.com>
Cc: Kent Overstreet <kent.overstreet@...ux.dev>,
 Sasha Levin <sashal@...nel.org>, Christoph Hellwig <hch@...radead.org>,
 linux-bcache@...r.kernel.org,
 Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
 zhangshida <zhangshida@...inos.cn>
Subject: Re: Fwd: [PATCH v2] bcache: use bio cloning for detached device
 requests

On 1/20/26 7:46 AM, Coly Li wrote:
>> @@ -949,6 +950,11 @@ static int bcache_device_init(struct
>> bcache_device *d, unsigned int block_size,
>>                         BIOSET_NEED_BVECS|BIOSET_NEED_RESCUER))
>>                 goto out_ida_remove;
>>
>> +       if (bioset_init(&d->bio_detach, 4,
> 					^^^^^-> I feel 4 might be a bit small
> here. bio_detached set is for normal IO when backing device is not
> attached to a cache device. I would suggest to set the pool size to
> 128 or 256.

Absolutely not, 4 is more than plenty. The pool elements are only ever
used if allocations fail, to guarantee forward progress. Setting aside
128 or 256 for that case is utterly wasteful, you only need a couple. 4
is a good number, if anything it should be smaller (2).

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ