Bug 196691
Summary: | fstrim refuses to freeze during system suspend (ext4) | ||
---|---|---|---|
Product: | IO/Storage | Reporter: | Imre Deak (imre.deak) |
Component: | Block Layer | Assignee: | Jens Axboe (axboe) |
Status: | NEEDINFO --- | ||
Severity: | normal | CC: | adrinael, benjamin.loison, david, imre.deak, marcos.souza.org, tomi.p.sarvela |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 4.15.0 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | bootlog |
Description
Imre Deak
2017-08-17 13:18:18 UTC
SSD is OCZ Vertex 3, firmware ver 2.25 Created attachment 257995 [details]
bootlog
The bug isn't MD related so assuming 'Block Layer' component for now. +Dave. Dave, I read some explanation from you of how fstrim could cause extensive delays. Do you think the 20s freeze during system suspend is just that, or could point to some other issue? Could changing the SSD or using discard instead prevent this? I'm assuming the discard just takes a long time to complete. We can't suspend with in-flight IO. So this doesn't look like a bug to me, the only option we have is to wait for the IO to complete. You can potentially improve the situation here by making discards happen in smaller units. That can be done by setting: /sys/block/nvme0n1/queue/discard_max_bytes (substitute nvme0n1 for your device) to a smaller value. Bigger discards will then be chopped into pieces of discard_max_bytes in size. (In reply to Jens Axboe from comment #5) > I'm assuming the discard just takes a long time to complete. We can't > suspend with in-flight IO. So this doesn't look like a bug to me, the only > option we have is to wait for the IO to complete. > > You can potentially improve the situation here by making discards happen in > smaller units. That can be done by setting: > > /sys/block/nvme0n1/queue/discard_max_bytes > > (substitute nvme0n1 for your device) to a smaller value. Bigger discards > will then be chopped into pieces of discard_max_bytes in size. Thanks, so I suppose this also depends on how fast the device can handle the trim/discard command. We'll try the above setting or else replacing the device, if that solves it I'm fine with closing this bug. > Thanks, so I suppose this also depends on how fast the device can handle the
> trim/discard command. We'll try the above setting or else replacing the
> device, if that solves it I'm fine with closing this bug.
Did the solution work for you? Can this bug be closed?
Thanks.
|