Whamcloud - gitweb
LU-18516 quota: use wait_woken for qsd_op_begin0() 41/59141/2
authorJames Simmons <jsimmons@infradead.org>
Sat, 22 Feb 2025 12:56:17 +0000 (07:56 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 May 2025 07:32:27 +0000 (07:32 +0000)
commit28b0398689a3627f626d434142f0e16b987061cd
tree0db6682bcc4a16e7544b8935708ee9c2c11c2f9d
parent4fd6de9b01beef0ca9ea7aa3a9e042479c6cb4b4
LU-18516 quota: use wait_woken for qsd_op_begin0()

Kernels with debugging enabled report for Lustre quota handling:

do not call blocking ops when !TASK_RUNNING;
? __might_sleep+0x9d/0xc0
  down_read_nested+0x2e/0x4b0
  lquota_disk_read+0x46e/0x800 [lquota]
  qsd_refresh_usage+0x105/0x3d0 [lquota]
  qsd_acquire+0xbe/0x7c0 [lquota]
  qsd_op_begin0+0x5f8/0xc80 [lquota]

This is due to qsd_acquire() performing operations that can sleep while
the kthread is in an idle state. The Linux kernel solution for this
is wait_woken(). Move the function qsd_op_begin0() from using
wait_event_idle_timeout() to wait_woken(). This will resolve the
potential sleeping issues.

Lustre-change: https://review.whamcloud.com/58156
Lustre-commit: 2417aeddc649840179a2575a28fdedf3fe662916

Test-Parameters: trivial testlist=sanity-quota
Change-Id: Id2b7a5886869bf0ed3d560e159524dcda841d8b0
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59141
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/quota/qsd_handler.c