mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Ben Segall <bsegall@google.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Roman Gushchin <klamm@yandex-team.ru>,
	pjt@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: fix unlocked reads of some cfs_b->quota/period
Date: Thu, 22 May 2014 17:35:04 +0200	[thread overview]
Message-ID: <20140522153504.GY30445@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140519224945.20303.93530.stgit@sword-of-the-dawn.mtv.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

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 #2: Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-05-22 15:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 22:49 Ben Segall
2014-05-21  7:38 ` Roman Gushchin
2014-05-22 15:35 ` Peter Zijlstra [this message]
2014-06-05 14:34 ` [tip:sched/core] sched/fair: Fix unlocked reads of some cfs_b-> quota/period tip-bot for Ben Segall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140522153504.GY30445@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bsegall@google.com \
    --cc=klamm@yandex-team.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pjt@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome