All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xie XiuQi <xiexiuqi@huawei.com>
To: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@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, 2 Jul 2013 12:11:27 +0800	[thread overview]
Message-ID: <51D252EF.2030500@huawei.com> (raw)
In-Reply-To: <1372734474.7363.66.camel@marge.simpson.net>

On 2013/7/2 11:07, Mike Galbraith wrote:
> 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.
> 

That is to say, the driver's code needs improvement.
Thank you Mike.

> -Mike
> 



  reply	other threads:[~2013-07-02  4:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01  6:45 [PATCH] sched: fix cpu utilization account error 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
2013-07-02  4:11       ` Xie XiuQi [this message]
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=51D252EF.2030500@huawei.com \
    --to=xiexiuqi@huawei.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bob.zhanghang@huawei.com \
    --cc=efault@gmx.de \
    --cc=huawei.libin@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.