[lkml]   [2020]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [f2fs-dev] [PATCH] f2fs: fix long latency due to discard during umount
On 2020/3/24 17:08, Chao Yu wrote:
> On 2020/3/18 12:44, Sahitya Tummala wrote:
>> F2FS already has a default timeout of 5 secs for discards that
>> can be issued during umount, but it can take more than the 5 sec
>> timeout if the underlying UFS device queue is already full and there
>> are no more available free tags to be used. In that case, submit_bio()
>> will wait for the already queued discard requests to complete to get
>> a free tag, which can potentially take way more than 5 sec.
>> Fix this by submitting the discard requests with REQ_NOWAIT
>> flags during umount. This will return -EAGAIN for UFS queue/tag full
>> scenario without waiting in the context of submit_bio(). The FS can
>> then handle these requests by retrying again within the stipulated
>> discard timeout period to avoid long latencies.

BTW, I guess later we can add nowait logic as a sub policy of
discard_policy, then DPOLICY_BG would be more configurable with
this nowait policy support.


>> Signed-off-by: Sahitya Tummala <>
> Reviewed-by: Chao Yu <>
> Thanks,
> _______________________________________________
> Linux-f2fs-devel mailing list
> .

 \ /
  Last update: 2020-03-24 10:48    [W:0.075 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site