linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: 陈华才 <chenhc@lemote.com>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: "Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Charles Wang" <muming.wq@taobao.com>,
	"Ingo Molnar" <mingo@kernel.org>,
	stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Seems like "sched: Add missing call to calc_load_exit_idle()"  should be reverted in 3.5 branch
Date: Fri, 5 Oct 2012 08:35:14 +0800 (CST)	[thread overview]
Message-ID: <2316.117.81.123.89.1349397314.squirrel@mail.lemote.com> (raw)

My opinion: The original patch "sched/nohz: Rewrite and fix load-avg
computation -- again" is designed for 3.5-branch and calc_load_exit_idle()
is called directly in tick_nohz_idle_exit(). So, the patch can be fully
applied in 3.5 and doesn't need to fix (Add the missing call), but not
fully applied in 3.6 (because code splitted) and need to fix.



> On Thu, Oct 04, 2012 at 08:31:59PM +0200, Peter Zijlstra wrote:
>> On Thu, 2012-10-04 at 10:46 -0700, Greg Kroah-Hartman wrote:
>> > On Thu, Oct 04, 2012 at 12:11:01PM +0800, Huacai Chen wrote:
>> > > Hi, Greg
>> > >
>> > > I found that Linux-3.5.5 accept this commit "sched: Add missing call
>> > > to calc_load_exit_idle()" but I think this isn't needed. Because
>> > > "5167e8d5417b sched/nohz: Rewrite and fix load-avg computation --
>> > > again not fully applied" is true for 3.6 branch, but not for 3.5
>> > > branch.
>> >
>> > But 5167e8d5417b is in 3.5, so shouldn't this commit still be
>> necessary?
>> >
>> > > In 3.5 branch, calc_load_exit_idle() is already called in
>> > > tick_nohz_idle_exit(), it doesn't need to be called at
>> > > tick_nohz_update_jiffies() again. In 3.6 branch, some code of
>> > > tick_nohz_idle_exit() is splitted to tick_nohz_restart_sched_tick()
>> > > and calc_load_exit_idle() is missing by accident, so commit "sched:
>> > > Add missing call to calc_load_exit_idle()" is needed.
>> >
>> > So this really should be dropped from 3.5?  Charles, Peter, Ingo, any
>> > thoughts here?
>>
>> Bah, lots of code movement there recently.. let me try and untangle all
>> that afresh.. /me checks out v3.5.5.
>>
>> OK, assuming ->tick_stopped means what the label says, then we only want
>> to call calc_load_enter_idle() when it flips to 1 and
>> calc_load_exit_idle() when it flips back to 0, such that when an actual
>> tick happens its got correct state.
>>
>> Now the actual patch "5167e8d5417b sched/nohz: Rewrite and fix load-avg
>> computation -- again not fully applied" modifies
>> tick_nohz_restart_sched_tick() which doesn't appear to exist in v3.5.5
>> and the patch fobbed it into tick_nohz_update_jiffies() which is called
>> from interrupt entry when nohz-idle so that the interrupt (and possible
>> tailing softirq) see a valid jiffies count.
>>
>> However, since we don't restart the tick, we won't be sampling load muck
>> and calling calc_load_exit_idle() from there is bound to confuse state.
>>
>> I hope.. damn this code ;-)
>>
>> I can't find wtf went wrong either, the initial patch 5167e8d5417bf5c
>> contains both hunks, but in that case the fixup 749c8814f0 doesn't make
>> sense, not can I find anything in merge commits using:
>>
>>   git log -S calc_load_exit_idle kernel/time/tick-sched.c
>>
>> /me puzzled
>
> I'm puzzled as well.  Any ideas if I should do anything here or not?
>
> greg k-h
>


-- 
江苏中科梦兰电子科技有限公司

软件部 陈华才

E-mail: chenhc@lemote.com

Web: http://www.lemote.com/

Add: 江苏省常熟市虞山镇梦兰工业园


             reply	other threads:[~2012-10-05  1:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05  0:35 陈华才 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-10-13  3:39 Seems like "sched: Add missing call to calc_load_exit_idle()" should be reverted in 3.5 branch 陈华才
2012-10-13  6:28 ` Greg Kroah-Hartman
     [not found] <CAAhV-H54CJdg+UekpucZ=kOgCY5r5vvYQ+v4VwAMTCv+mCedXA@mail.gmail.com>
2012-10-04 17:46 ` Greg Kroah-Hartman
2012-10-04 18:31   ` Peter Zijlstra
2012-10-04 22:27     ` Greg Kroah-Hartman
2012-10-05 10:21       ` Peter Zijlstra
2012-10-05 16:17         ` Greg Kroah-Hartman
2012-10-05 17:10         ` Jonathan Nieder
2012-10-05 17:23           ` Peter Zijlstra
2012-10-08 11:33             ` Charles Wang
2012-10-05  1:39     ` Jonathan Nieder
2012-10-08 11:23       ` Charles Wang

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=2316.117.81.123.89.1349397314.squirrel@mail.lemote.com \
    --to=chenhc@lemote.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=muming.wq@taobao.com \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).