[dm-devel] fstrim on raid1 LV with writemostly PV leads to system freeze
Roman Mamedov
rm at romanrm.net
Thu Sep 21 22:03:40 UTC 2023
On Thu, 21 Sep 2023 17:45:24 -0400
Mike Snitzer <snitzer at kernel.org> wrote:
> I just verified that 6.5.0 does have this DM core fix (needed to
> prevent excessive splitting of discard IO.. which could cause fstrim
> to take longer for a DM device), but again 6.5.0 has this fix so it
> isn't relevant:
> be04c14a1bd2 dm: use op specific max_sectors when splitting abnormal io
>
> Given your use of 'writemostly' I'm inferring you're using lvm2's
> raid1 that uses MD raid1 code in terms of the dm-raid target.
>
> Discards (more generic term for fstrim) are considered writes, so
> writemostly really shouldn't matter... but I know that there have been
> issues with MD's writemostly code (identified by others relatively
> recently).
>
> All said: hopefully someone more MD oriented can review your report
> and help you further.
>
> Mike
I've reported that write-mostly TRIM gets split into 1MB pieces, which can be
an order of magnitude slower on some SSDs: https://www.spinics.net/lists/raid/msg72471.html
Nobody cared to reply, investigate or fix.
Maybe your system hasn't frozen too, just taking its time in processing all
the tiny split requests.
--
With respect,
Roman
More information about the dm-devel
mailing list