Re: [PATCH] softirq: fix memory corruption when freeing tasklet_struct
From: Mikulas Patocka
Date: Fri Jan 26 2024 - 13:09:52 EST
On Fri, 26 Jan 2024, Hannes Reinecke wrote:
> Oh, it's this time of the year again?
> (This topic regularly comes up ...)
>
> The reason is not that it will disable dm-multipath (Mike Snitzer put in
> bio-based multipathing as an additional code path); the reason is that
> dm-multipath performance will suffer when you remove request-based DM.
Is there some benchmark that says how much will it suffer?
> DM-multipath schedules based on request (if you use the request-based
> interface) or bios (if you use the bio-based interface).
> Any merge decision is typically done by the block layer when combining bios
> into requests; and you can only merge bios if the bvecs are adjacent.
> So if you use bio-based multipathing you will spread sequential bios
> across all paths, leaving the block layer unable to merge requests.
The same problem exists in raid1 and there's a function read_balance that
solves it. If the starting sector of a new bio matches the ending sector
of a previous bio, then submit it for the same device.
> For request based multipathing the requests are already fully-formed,
> and scheduling across paths does not change them.
> Things are slightly better with multi-page bvecs nowadays, but the
> overall picture still stands.
>
> Another thing is timeouts; bios don't do timeouts, so a bio can run
> for an arbitrary time with no chance of interrupting it.
> Requests do have a timeout, and will be aborted from the driver when
> the timeout is hit.
> Seeing that 99% of all I/O issues I've seen _are_ timeouts it becomes
> a crucial feature if you want dm-multipath to control failover time.
You can set timeout of the underlying physical devices.
> Cheers,
>
> Hannes
Mikulas