Whamcloud - gitweb
LU-9906 clio: use pagevec_release for many pages 67/28667/15
authorLi Dongyang <dongyangli@ddn.com>
Fri, 26 Oct 2018 09:09:26 +0000 (20:09 +1100)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Nov 2018 04:05:24 +0000 (04:05 +0000)
commitb4a959eb61bc7e6a64261c704f3f3f5e220c2f02
tree74dede7dc29973675885d24e44c52f43702b469c
parent2dae2b8ffb8f3238f240e0e59987e93ce3e31d86
LU-9906 clio: use pagevec_release for many pages

When Lustre releases cached pages, it always uses
page_release, even when releasing many pages.

When clearing OST ldlm lock lrus in parallel with lots of
cached data, the ldlm_bl threads spend most of their time
contending for the zone lock taken by page_release.
Also, when osc_lru_reclaim kicks in when there's not enough
LRU slots during I/O, the contention on zone lock kills
I/O performance.

Switching to pagevec when we expect to actually release the
pages (discard_pages, truncate, lru reclaim) brings
significant performance benefits as shown below.

This patch introduces cl_pagevec_put() to release the pages
in batches using pagevec, which is essentially calling
release_pages().

  mpirun -np 48 ior -w -r -t 16m -b 16g -F -e -vv -o ... -i 1 [-B]

                mode         write (GB/s)    read (GB/s)
  master        O_DIRECT     20.8            21.8
  master+patch  O_DIRECT     20.7            22.2
  master        Buffered     11.6            12.3
  master+patch  Buffered     15.3            19.6

Also clean up the dead lovsub_page related code.

Signed-off-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I71447528db12858defb627c9c03b7193d116c935
Reviewed-on: https://review.whamcloud.com/28667
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 files changed:
lustre/include/cl_object.h
lustre/include/lustre_compat.h
lustre/include/lustre_osc.h
lustre/llite/vvp_page.c
lustre/lov/Makefile.in
lustre/lov/lov_cl_internal.h
lustre/lov/lovsub_page.c [deleted file]
lustre/obdclass/cl_page.c
lustre/obdecho/echo_client.c
lustre/osc/osc_cache.c
lustre/osc/osc_page.c
lustre/osd-ldiskfs/osd_io.c