Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1402808

Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing update_rq_clock()

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Matt Fleming <matt@codeblueprint.co.uk>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing update_rq_clock()
Date Wed, 18 May 2016 10:50:03 +0200
Message-ID <rA5l1-87e-37@gated-at.bofh.it> (permalink)
References <ry4W5-3UF-5@gated-at.bofh.it> <ry4W6-3UF-17@gated-at.bofh.it> <rzg8Z-u7-317@gated-at.bofh.it> <rznjX-5fy-3@gated-at.bofh.it> <rzEkN-7L0-1@gated-at.bofh.it> <rzMim-4v6-19@gated-at.bofh.it> <rzZIC-4vM-11@gated-at.bofh.it>
X-Original-To Yuyang Du <yuyang.du@intel.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeblueprint-co-uk.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QgSvpK5ufwbCA2o+Z47ajeoQOQ15I5m/mLP+28ypgiA=; b=gEx3mf0UQOwHhgXXe5MnAtmd//AEghN8NxqjlI/YRV4C35GWBv0Y2hTPhZyMqCXwAB xY4F+6CuZscoXx49k8s7lK149dRadRsx5HtvUEXDsIyZKeqMTUS0JhpUtCYR7y7IzN6z SufSdYqoDPhUEUaEpWAjBMPzTkzUeUfzVvruSQ8Hx2UktWLGLS253SJKnfNsqD3r2P1L 6Yb94wk1mqYSz9xnUmGhqss3WZiCZ+EXaqUKc0PT8AWGXrG4Wz0X37VsE3jRdyAb8iaG GaJi2AZI8WYmy0du8+dzPUxDaTh0xyRhjWBk7LSWMAN/7DWB8nlX/81mUvqE+j8fTSap whaQ==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QgSvpK5ufwbCA2o+Z47ajeoQOQ15I5m/mLP+28ypgiA=; b=AuiUxlTHJMFS8B1xtF10mv/zxBo/6yw1SXnPZ9VEnpuOYqxpHCw1AxuNaO1ZA0DjW5 Ti3QO8X9SD8QLFW1FUkZi8OzTE3LC+uvrO0kP20IXHUkUo/73ewe0vefFwZso6vJMEO0 LV9QrXmg9Dwp82ZPaUbxMwlR96RwbkjJhXsbIcnHgy4Odifxmgavjsm00wAmG1s0FZH/ Hw5KpU3QwA7sBUaa0SqMCJdxfDhNm2Br8OCXoiCU1C34QhhPyHTmNdwHuGYz6CR/81pv GnQXzLT2QUCYHJiQ/u+cZgkWE722bwgtWEXG7ddQ4anUK6P6FGdy3GRAfdUDu50gu/Fy lD3Q==
X-Gm-Message-State AOPr4FUo5Py32QoGqG0aCMoANdWPSeG6oFOhCI4YOZGitEbp6P6BRYfWONURl0QU59FoRw==
X-Received by 10.194.45.169 with SMTP id o9mr5657424wjm.156.1463560881755; Wed, 18 May 2016 01:41:21 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 43
Organization linux.* mail to news gateway
X-Original-Cc Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@kernel.org>, linux-kernel@vger.kernel.org, Byungchul Park <byungchul.park@lge.com>, Frederic Weisbecker <fweisbec@gmail.com>, Luca Abeni <luca.abeni@unitn.it>, "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>, Rik van Riel <riel@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, Wanpeng Li <wanpeng.li@hotmail.com>, Mel Gorman <mgorman@techsingularity.net>, Mike Galbraith <umgwanakikbuti@gmail.com>
X-Original-Date Wed, 18 May 2016 09:41:20 +0100
X-Original-Message-ID <20160518084120.GF21993@codeblueprint.co.uk>
X-Original-References <1463082593-27777-1-git-send-email-matt@codeblueprint.co.uk> <1463082593-27777-6-git-send-email-matt@codeblueprint.co.uk> <20160515021439.GC8790@intel.com> <20160516094638.GB6574@codeblueprint.co.uk> <20160516201109.GD8790@intel.com> <20160517122415.GD21993@codeblueprint.co.uk> <20160517190127.GE8790@intel.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1402808

Show key headers only | View raw


On Wed, 18 May, at 03:01:27AM, Yuyang Du wrote:
> On Tue, May 17, 2016 at 01:24:15PM +0100, Matt Fleming wrote:
> > So, if the code looks like the following, either now or in the future,
> > 
> > static void __schedule(bool preempt)
> > {
> > 	...
> > 	/* Clear RQCF_ACT_SKIP */
> > 	rq->clock_update_flags = 0;
> > 	...
> > 	delta = rq_clock();
> > }
>  
> Sigh, you even said "Clear RQCF_ACT_SKIP", but you not only clear it,
> you clear everything.

That was sloppy on my part but intentional because that's what the
code looks like in tip/sched/core today.

It was purely meant to demonstrate that setting RQCF_UPDATE just
because RQCF_ACT_SKIP is set does not make sense. You can replace the
clearing line with the correct bit masking operation.

But I get it, the pseudo-code was confusing. I'll send out a v2.

> And if you clear the RQCF_UPDATE also (maybe you shouldn't, but
> actually it does not matter), of course you will get a warning...

Right, I wouldn't actually clear RQCF_UPDATE in v2 of this patch.

> In addition, it looks like multiple skips are possible, so:
 
I'm not sure what you mean, could you elaborate?

> update_rq_clock() {
>         rq->clock_update_flags |= RQCF_UPDATE;
> 
>         ...
> }
> 
> instead of clearing the skip flag there.

Huh? RQCF_*_SKIP are not cleared in update_rq_clock().

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 5/5] sched/core: Add debug code to catch missing update_rq_clock() Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-12 22:00 +0200
  Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing  update_rq_clock() Yuyang Du <yuyang.du@intel.com> - 2016-05-16 04:10 +0200
    Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing  update_rq_clock() Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-16 11:50 +0200
      Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing  update_rq_clock() Yuyang Du <yuyang.du@intel.com> - 2016-05-17 06:00 +0200
        Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing  update_rq_clock() Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-17 14:30 +0200
          Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing  update_rq_clock() Yuyang Du <yuyang.du@intel.com> - 2016-05-18 04:50 +0200
            Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing  update_rq_clock() Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-18 10:50 +0200
              Re: [RFC][PATCH 5/5] sched/core: Add debug code to catch missing  update_rq_clock() Yuyang Du <yuyang.du@intel.com> - 2016-05-19 08:40 +0200

csiph-web