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.13.53~252 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=117f587bc3e60f4dd1c939f8488e43cb752c12ca;hp=f07508d17b49574c7ea47a855c6e8af2b23c3add 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") Cray-bug-id: LUS-8460 Change-Id: I507b3d10dd5374772456853098bc26053cbd140d Signed-off-by: Alexander Zarochentsev Reviewed-on: https://review.whamcloud.com/37429 Tested-by: jenkins Reviewed-by: Andrew Perepechko Reviewed-by: Andreas Dilger Reviewed-by: Vladimir Saveliev Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index f2a8dd7..a33641d 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -843,8 +843,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: