Whamcloud - gitweb
LU-12651 osc: always call update_next_shrink 29/37429/4
authorAlexander Zarochentsev <c17826@cray.com>
Tue, 4 Feb 2020 17:47:06 +0000 (20:47 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 14 Feb 2020 05:49:34 +0000 (05:49 +0000)
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 <c17826@cray.com>
Reviewed-on: https://review.whamcloud.com/37429
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_request.c

index f2a8dd7..a33641d 100644 (file)
@@ -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: