Re: [PATCH] sched: fix unlocked reads of some cfs_b->quota/period
From: Peter Zijlstra
Date: Thu May 22 2014 - 11:35:16 EST
On Mon, May 19, 2014 at 03:49:45PM -0700, Ben Segall wrote:
> @@ -3783,7 +3787,7 @@ static void __maybe_unused unthrottle_offline_cfs_rqs(struct rq *rq)
> * clock_task is not advancing so we just need to make sure
> * there's some valid quota amount
> */
> - cfs_rq->runtime_remaining = cfs_b->quota;
> + cfs_rq->runtime_remaining = 1;
> if (cfs_rq_throttled(cfs_rq))
> unthrottle_cfs_rq(cfs_rq);
> }
>
That ^, causes:
kernel/sched/fair.c: In function âunthrottle_offline_cfs_rqsâ:
kernel/sched/fair.c:3782:25: warning: unused variable âcfs_bâ [-Wunused-variable]
Stuck this on:
---
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3779,8 +3779,6 @@ static void __maybe_unused unthrottle_of
struct cfs_rq *cfs_rq;
for_each_leaf_cfs_rq(rq, cfs_rq) {
- struct cfs_bandwidth *cfs_b = tg_cfs_bandwidth(cfs_rq->tg);
-
if (!cfs_rq->runtime_enabled)
continue;
Attachment:
pgpUak2H3FSgz.pgp
Description: PGP signature