[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <51D253CA.5080204@huawei.com>
Date: Tue, 2 Jul 2013 12:15:06 +0800
From: Xie XiuQi <xiexiuqi@...wei.com>
To: Michael Wang <wangyun@...ux.vnet.ibm.com>
CC: Mike Galbraith <efault@....de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...e.hu>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Li Zefan <lizefan@...wei.com>,
Zhang Hang <bob.zhanghang@...wei.com>,
Li Bin <huawei.libin@...wei.com>
Subject: Re: [PATCH] sched: fix cpu utilization account error
On 2013/7/2 11:20, Michael Wang wrote:
> Hi, Xie
>
> On 07/01/2013 07:26 PM, Xie XiuQi wrote:
> [snip]
>> Here is the kthread main logic. Although it's not a good idea, but it does
>> exist:
>> while (!kthread_should_stop()) {
>> /* call schedule every 1 sec */
>> if (HZ <= jiffies - last) {
>> last = jiffies;
>> schedule();
>> }
>>
>> /* get data and sent it */
>> get_msg();
>> send_msg();
>
> What about use cond_resched() here? Isn't that more gentle?
>
That's a good idea for driver implementation.
Thank you Michael.
> Regards,
> Michael Wang
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists