Whamcloud - gitweb
LU-18053 osc: add another cond_resched() to osc_lru_shrink() 90/56390/4
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 30 Jul 2024 15:40:19 +0000 (08:40 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 May 2025 03:42:53 +0000 (03:42 +0000)
commit1329003c03d7a40262cad74c1446313eb94a0f9a
tree5ddf6aa818f3f4263972b1067597996644ac3ae4
parentc00bb50624a3eedad16759075cebeedf17030ba4
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.

Lustre-change: https://review.whamcloud.com/55888
Lustre-commit: 66549c1540b2931ae1d1d1ebb50afbf15683baf4

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