Whamcloud - gitweb
LU-18446 ptlrpc: fix cpu_latency_work() completion time 85/59285/2
authorAndreas Dilger <adilger@whamcloud.com>
Mon, 19 May 2025 08:17:21 +0000 (02:17 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 7 Jun 2025 22:54:10 +0000 (22:54 +0000)
Consider the cpu_latency_work() completion when it is equal to the
scheduled jiffies counter, rather than only afterward.

Fixes: 54a64ea818 ("LU-18446 ptlrpc: lower CPUs latency during client I/O")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I985d29b493bda02aa69ad54d9aae581a05fad685
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59285
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bruno Faccini <bfaccini@nvidia.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/connection.c

index 1adb7cb..17b3773 100644 (file)
@@ -70,7 +70,7 @@ static void cpu_latency_work(struct work_struct *work)
                                   delayed_work.work);
        cpu = (latency_qos - cpus_latency_qos) / sizeof(struct cpu_latency_qos);
        mutex_lock(&latency_qos->lock);
-       if (time_after64(jiffies_64, latency_qos->deadline)) {
+       if (time_after_eq64(jiffies_64, latency_qos->deadline)) {
                CDEBUG(D_INFO, "work item of %p (cpu %d) has reached its deadline %llu, at %llu\n",
                       latency_qos, cpu, latency_qos->deadline, jiffies_64);
                pm_qos_req_done = latency_qos->pm_qos_req;