pagecache: support percpu refcount to imporve performance
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...
Showing
- fs/fcntl.c 20 additions, 0 deletionsfs/fcntl.c
- include/linux/mm.h 23 additions, 0 deletionsinclude/linux/mm.h
- include/linux/page-flags.h 2 additions, 0 deletionsinclude/linux/page-flags.h
- include/linux/page_ref.h 11 additions, 0 deletionsinclude/linux/page_ref.h
- include/linux/pagemap.h 24 additions, 0 deletionsinclude/linux/pagemap.h
- include/trace/events/mmflags.h 2 additions, 1 deletioninclude/trace/events/mmflags.h
- include/uapi/linux/fcntl.h 2 additions, 0 deletionsinclude/uapi/linux/fcntl.h
- mm/filemap.c 72 additions, 2 deletionsmm/filemap.c
- mm/swap.c 2 additions, 0 deletionsmm/swap.c
Please register or sign in to comment