• J
    f2fs: optimize the victim searching loop slightly · a57e564d
    Jin Xu 提交于
    Since the MAX_VICTIM_SEARCH has been enlarged from 20 to 4096,
    the victim searching overhead will be increased much than before,
    especially for SSR that searches victim for use quiet often.
    This patch intends to reduce the overhead a little bit by:
    - make the get_gc_cost a inline routine to reduce function call
      overhead
    - reduce multiplication and division operations
    - reduce unnecessary comparison operation
    Signed-off-by: NJin Xu <jinuxstyle@gmail.com>
    Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
    a57e564d
gc.c 17.8 KB