Whamcloud - gitweb
LU-11518 osc: Do ELC on locks with no OSC object 84/34584/5
authorPatrick Farrell <pfarrell@whamcloud.com>
Wed, 3 Apr 2019 14:19:44 +0000 (10:19 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 25 Sep 2020 03:12:38 +0000 (03:12 +0000)
Currently, osc_ldlm_weigh_ast weighs locks with no OSC
object in their ast data as "1", meaning the lock is not
considered for ELC.

This doesn't make much sense, since if there is no OSC
object, it's unlikely there's any data under the lock, so
it's actually a good candidate for ELC.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ie832afbf2479f3a348e44d2c21992696830000ae
Reviewed-on: https://review.whamcloud.com/34584
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index 4c76e52..f3ed624 100644 (file)
@@ -726,7 +726,7 @@ unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock)
        if (obj == NULL)
-               GOTO(out, weight = 1);
+               GOTO(out, weight = 0);
        list_for_each_entry(oscl, &obj->oo_ol_list, ols_nextlock_oscobj) {