Whamcloud - gitweb
LU-18053 osc: add another cond_resched() to osc_lru_shrink() 88/55888/4
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 30 Jul 2024 15:40:19 +0000 (08:40 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 21:58:56 +0000 (21:58 +0000)
commit66549c1540b2931ae1d1d1ebb50afbf15683baf4
tree63758afb9762944f8dda780c030a3118cec5ca1d
parenta14b4fc04adc0cda2510c6d05515e6b7dc33f54e
LU-18053 osc: add another cond_resched() to osc_lru_shrink()

When discarding pages osc_lru_shrink() eventually calls
delete_from_page_cache() which must aquire a spin lock
on the page cache.  On systems with a large number of
CPUs this can result in spinlock contention and soft
lockups.  Add a call to cond_resched() to yield the CPU
as needed.  This is a follow up to LU-17630.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Change-Id: I1ebf940a9a96c433f527f3e0dd9dc765b2645c97
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55888
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
lustre/osc/osc_page.c