“e6f76314b24f1c0a5c7f62fcba5bf2b085e07021”上不存在“...sun/java2d/git@gitcode.net:openanolis/dragonwell8_jdk.git”
  • Y
    pagecache: support percpu refcount to imporve performance · 8b9ea901
    Yunfeng Ye 提交于
    euleros inclusion
    category: feature
    feature: pagecache percpu refcount
    bugzilla: 31398
    CVE: NA
    
    -------------------------------------------------
    
    The pagecache manages the file physical pages, and the life cycle of
    page is managed by atomic counting. With the increasing number of cpu
    cores, the cost of atomic counting is very large when reading file
    pagecaches at large concurrent.
    
    For example, when running nginx http application, the biggest hotspot is
    found in the atomic operation of find_get_entry():
    
     11.94% [kernel] [k] find_get_entry
      7.45% [kernel] [k] do_tcp_sendpages
      6.12% [kernel] [k] generic_file_buffered_read
    
    So we using the percpu refcount mechanism to fix this problem. and the
    test result show that the read performance of nginx http can be improved
    by 100%:
    
      worker   original(requests/sec)   percpu(requests/sec)   imporve
      64       759656.87                1627088.95             114.2%
    
    Notes: we use page->lru to save percpu information, so the pages with
    percpu attribute will not be recycled by memory recycling process, we
    should avoid grow the file size unlimited.
    Signed-off-by: NYunfeng Ye <yeyunfeng@huawei.com>
    Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    8b9ea901
mmflags.h 8.3 KB