Skip to content
Commit dcc73f99 authored by Sahitya Tummala's avatar Sahitya Tummala Committed by Kader Bava
Browse files

f2fs: allow to change discard policy based on cached discard cmds



With the default DPOLICY_BG discard thread is ioaware, which prevents
the discard thread from issuing the discard commands. On low RAM setups,
it is observed that these discard commands in the cache are consuming
high memory. This patch aims to relax the memory pressure on the system
due to f2fs pending discard cmds by changing the policy to DPOLICY_FORCE
based on the nm_i->ram_thresh configured.

Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarMarco Zanin <mrczn.bb@gmail.com>
Signed-off-by: default avatarimprobir <ghosh_probir@yahoo.com>
parent 9a33b466
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment