linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] workqueue: remove redundant timer_stats_timer_set_start_info() call
@ 2013-09-10  6:35 Libin
  2013-09-10 13:45 ` Tejun Heo
  0 siblings, 1 reply; 3+ messages in thread
From: Libin @ 2013-09-10  6:35 UTC (permalink / raw)
  To: tj, tglx; +Cc: linux-kernel, akpm, mingo, wangyijing, guohanjun, huawei.libin

From: Li Bin <huawei.libin@huawei.com>

There is a redundant call for timer_stats_timer_set_start_info(),
because it is the responsibility of the 'timer add' function:

add_timer_on()
|- timer_stats_timer_set_start_info()

add_timer()
|- mod_timer()
	|- __mod_timer()
		|- timer_stats_timer_set_start_info()

So the calling here is redundant, remove it.

Signed-off-by: Li Bin <huawei.libin@huawei.com>
---
 kernel/workqueue.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 987293d..51ca50e 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1462,8 +1462,6 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
 		return;
 	}
 
-	timer_stats_timer_set_start_info(&dwork->timer);
-
 	dwork->wq = wq;
 	dwork->cpu = cpu;
 	timer->expires = jiffies + delay;
-- 
1.8.2.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] workqueue: remove redundant timer_stats_timer_set_start_info() call
  2013-09-10  6:35 [PATCH] workqueue: remove redundant timer_stats_timer_set_start_info() call Libin
@ 2013-09-10 13:45 ` Tejun Heo
  2013-09-11  0:49   ` Libin
  0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2013-09-10 13:45 UTC (permalink / raw)
  To: Libin; +Cc: tglx, linux-kernel, akpm, mingo, wangyijing, guohanjun

On Tue, Sep 10, 2013 at 02:35:27PM +0800, Libin wrote:
> From: Li Bin <huawei.libin@huawei.com>
> 
> There is a redundant call for timer_stats_timer_set_start_info(),
> because it is the responsibility of the 'timer add' function:
> 
> add_timer_on()
> |- timer_stats_timer_set_start_info()
> 
> add_timer()
> |- mod_timer()
> 	|- __mod_timer()
> 		|- timer_stats_timer_set_start_info()
> 
> So the calling here is redundant, remove it.

I think it's intentional to record the caller's address so that timers
from delayed_work items can be distinguished.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] workqueue: remove redundant timer_stats_timer_set_start_info() call
  2013-09-10 13:45 ` Tejun Heo
@ 2013-09-11  0:49   ` Libin
  0 siblings, 0 replies; 3+ messages in thread
From: Libin @ 2013-09-11  0:49 UTC (permalink / raw)
  To: Tejun Heo; +Cc: tglx, linux-kernel, akpm, mingo, wangyijing, guohanjun

On 2013/9/10 21:45, Tejun Heo wrote:
> On Tue, Sep 10, 2013 at 02:35:27PM +0800, Libin wrote:
>> From: Li Bin <huawei.libin@huawei.com>
>>
>> There is a redundant call for timer_stats_timer_set_start_info(),
>> because it is the responsibility of the 'timer add' function:
>>
>> add_timer_on()
>> |- timer_stats_timer_set_start_info()
>>
>> add_timer()
>> |- mod_timer()
>> 	|- __mod_timer()
>> 		|- timer_stats_timer_set_start_info()
>>
>> So the calling here is redundant, remove it.
> 
> I think it's intentional to record the caller's address so that timers
> from delayed_work items can be distinguished.
> 

Indeed the case, thank you tejun.
Libin

> Thanks.
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-11  0:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10  6:35 [PATCH] workqueue: remove redundant timer_stats_timer_set_start_info() call Libin
2013-09-10 13:45 ` Tejun Heo
2013-09-11  0:49   ` Libin

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).