Skip to contentSkip to conversation

workqueue: remove redundant timer_stats_timer_set_start_info() call

PATCH In review Libin 2 participants 3 messages Sep 10, 2013 – Sep 11, 2013 Workqueue

lore
Share & tools
lore

Libin

author
#0 lore raw

PATCH 1/1 workqueue: remove redundant timer_stats_timer_set_start_info() call

From: Li Bin <[email protected]>

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.

---
 kernel/workqueue.c | 2 --
 1 file changed, 2 deletions(-)
kernel/workqueue.c +0 -2
index 987293d..51ca50e 100644
@@ -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;
Signature · 1 line
1.8.2.1
maintainer
#1 lore raw
Quoted 8 lines · Libin

From: Li Bin <[email protected]>

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

Quoted 6 lines

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.

Signature · 1 line
tejun
author
#2 lore raw
Quoted 14 lines · Tejun Heo
Quoted 13 lines · Libin

From: Li Bin <[email protected]>

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()
Quoted 5 lines
Quoted 1 line

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

Quoted 2 lines

Thanks.