From: Alexander Zarochentsev Date: Tue, 4 Feb 2020 17:47:06 +0000 (+0300) Subject: LU-12651 osc: always call update_next_shrink X-Git-Tag: 2.12.5-RC1~75 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=10a799263964422df575038d3dfb507a09bfa221;p=fs%2Flustre-release.git LU-12651 osc: always call update_next_shrink Call update_next_shrink in case of clients not supporting grant shrinking or clients with grant shrinking explicitely disabled. Otherwise osc_grant_work_handler() schedules itself immediately after its completion causing excessive CPU consumption. Fixes: 3e070e30a98d ("LU-8708 osc: enable/disable OSC grant shrink") Lustre-change: https://review.whamcloud.com/37429 Lustre-commit: 117f587bc3e60f4dd1c939f8488e43cb752c12ca Cray-bug-id: LUS-8460 Change-Id: I507b3d10dd5374772456853098bc26053cbd140d Signed-off-by: Alexander Zarochentsev Reviewed-by: Andrew Perepechko Reviewed-by: Andreas Dilger Reviewed-by: Vladimir Saveliev Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/37572 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 30e1aa7..41fd462 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -851,8 +851,10 @@ static int osc_should_shrink_grant(struct client_obd *client) return 0; if (!OCD_HAS_FLAG(&client->cl_import->imp_connect_data, GRANT_SHRINK) || - client->cl_import->imp_grant_shrink_disabled) + client->cl_import->imp_grant_shrink_disabled) { + osc_update_next_shrink(client); return 0; + } if (ktime_get_seconds() >= next_shrink - 5) { /* Get the current RPC size directly, instead of going via: