• Jaegeuk Kim's avatar
    f2fs: introduce sysfs entry to control in-place-update policy · 216fbd64
    Jaegeuk Kim authored
    This patch introduces new sysfs entries for users to control the policy of
    in-place-updates, namely IPU, in f2fs.
    
    Sometimes f2fs suffers from performance degradation due to its out-of-place
    update policy that produces many additional node block writes.
    If the storage performance is very dependant on the amount of data writes
    instead of IO patterns, we'd better drop this out-of-place update policy.
    
    This patch suggests 5 polcies and their triggering conditions as follows.
    
    [sysfs entry name = ipu_policy]
    
    0: F2FS_IPU_FORCE       all the time,
    1: F2FS_IPU_SSR         if SSR mode is activated,
    2: F2FS_IPU_UTIL        if FS utilization is over threashold,
    3: F2FS_IPU_SSR_UTIL    if SSR mode is activated and FS utilization is over
                            threashold,
    4: F2FS_IPU_DISABLE    disable IPU. (=default option)
    
    [sysfs entry name = min_ipu_util]
    
    This parameter controls the threshold to trigger in-place-updates.
    The number indicates percentage of the filesystem utilization, and used by
    F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
    
    For more details, see need_inplace_update() in segment.h.
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
    216fbd64
super.c 28.2 KB