On Sun, Aug 17, 2025 at 01:11:34PM +0200, BERTRAND Joël wrote: > > > > For stacked device drivers (like dk,cgd,ccd or vnd), it's usually > > better to use simple FIFO on the upper layers and to choose the > > buffer strategy only for the lowest layer that actually talks > > to hardware. > > I don't understand. For example, my rootfs is on /dev/raid0a.
> If I change strategy on raid0 device, all slices are modified with the > same strategy. The strategy is for the whole device, not for a slice. A partition is just the notion to access a disk with some offset and a size limit. > And I cannot modify ccd0 strategy (nor wedges strategies > on this ccd0 device) : Yes, neither implements the DIOCSTRATEGY ioctl to change the strategy. Wedges have fcfs hardcoded, and on query, they report the strategy of the parent device. ccd also use fcfs, but its ioctl routine has a bug (not just for the query). That patch probably fixes it: diff -p -u -r1.192 ccd.c --- ccd.c 8 Jan 2025 08:24:07 -0000 1.192 +++ ccd.c 17 Aug 2025 12:30:48 -0000 @@ -1172,6 +1172,7 @@ ccdioctl(dev_t dev, u_long cmd, void *da if (error != EPASSTHROUGH) return error; + error = 0; switch (cmd) { case DIOCGSTRATEGY: { > > On the other hand, the upper layers rarely queue anything, so > > the difference is just how much CPU time is wasted in processing > > an expensive strategy on multiple layers. > > > > > > Modern disks queue many requests themselves, the strategy > > used by the kernel has little meaning then. Just like above, > > the stragey done by the lowest layer counts. > > That being said, if I understand, disksort or readprio could be more > efficient than priocscan. Probably. But fcfs is the most efficient. Greetings, -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."