From: Mike Galbraith <efault@gmx.de>
To: Xie XiuQi <xiexiuqi@huawei.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
stable@vger.kernel.org, Li Zefan <lizefan@huawei.com>,
Zhang Hang <bob.zhanghang@huawei.com>,
Li Bin <huawei.libin@huawei.com>
Subject: Re: [PATCH] sched: fix cpu utilization account error
Date: Tue, 02 Jul 2013 05:07:54 +0200 [thread overview]
Message-ID: <1372734474.7363.66.camel@marge.simpson.net> (raw)
In-Reply-To: <51D16777.5000703@huawei.com>
On Mon, 2013-07-01 at 19:26 +0800, Xie XiuQi wrote:
> Here is the kthread main logic. Although it's not a good idea, but it does
> exist:
Why not fix this instead?
> while (!kthread_should_stop()) {
> /* call schedule every 1 sec */
> if (HZ <= jiffies - last) {
> last = jiffies;
> schedule();
> }
Hanging out in the kernel for ages is not cool. That doesn't mean
something else might not pop up that forces the issue, but to date it
has not, and sacrificing precious fastpath cycles is not attractive.
-Mike
next prev parent reply other threads:[~2013-07-02 3:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 6:45 Xie XiuQi
2013-07-01 7:36 ` Mike Galbraith
2013-07-01 11:26 ` Xie XiuQi
2013-07-01 11:43 ` Mike Galbraith
2013-07-02 3:07 ` Mike Galbraith [this message]
2013-07-02 4:11 ` Xie XiuQi
2013-07-02 3:20 ` Michael Wang
2013-07-02 4:15 ` Xie XiuQi
2013-07-01 15:19 ` Greg KH
2013-07-02 1:41 ` Xie XiuQi
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=1372734474.7363.66.camel@marge.simpson.net \
--to=efault@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=bob.zhanghang@huawei.com \
--cc=huawei.libin@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@elte.hu \
--cc=stable@vger.kernel.org \
--cc=xiexiuqi@huawei.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