Skip to content

Commit 53bf837

Browse files
KAGA-KOKOIngo Molnar
authored andcommitted
timers: Remove set_timer_slack() leftovers
We now have implicit batching in the timer wheel. The slack API is no longer used, so remove it. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Alan Stern <[email protected]> Cc: Andrew F. Davis <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Chris Mason <[email protected]> Cc: David S. Miller <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Dmitry Eremin-Solenikov <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: George Spelvin <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Jaehoon Chung <[email protected]> Cc: Jens Axboe <[email protected]> Cc: John Stultz <[email protected]> Cc: Josh Triplett <[email protected]> Cc: Len Brown <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mathias Nyman <[email protected]> Cc: Pali Rohár <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Sebastian Reichel <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 500462a commit 53bf837

File tree

8 files changed

+1
-38
lines changed

8 files changed

+1
-38
lines changed

block/genhd.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,12 +1523,7 @@ static void __disk_unblock_events(struct gendisk *disk, bool check_now)
15231523
if (--ev->block)
15241524
goto out_unlock;
15251525

1526-
/*
1527-
* Not exactly a latency critical operation, set poll timer
1528-
* slack to 25% and kick event check.
1529-
*/
15301526
intv = disk_events_poll_jiffies(disk);
1531-
set_timer_slack(&ev->dwork.timer, intv / 4);
15321527
if (check_now)
15331528
queue_delayed_work(system_freezable_power_efficient_wq,
15341529
&ev->dwork, 0);

drivers/mmc/host/jz4740_mmc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,8 +1068,6 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
10681068
jz4740_mmc_clock_disable(host);
10691069
setup_timer(&host->timeout_timer, jz4740_mmc_timeout,
10701070
(unsigned long)host);
1071-
/* It is not important when it times out, it just needs to timeout. */
1072-
set_timer_slack(&host->timeout_timer, HZ);
10731071

10741072
host->use_dma = true;
10751073
if (host->use_dma && jz4740_mmc_acquire_dma_channels(host) != 0)

drivers/power/bq27xxx_battery.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,11 +735,8 @@ static void bq27xxx_battery_poll(struct work_struct *work)
735735

736736
bq27xxx_battery_update(di);
737737

738-
if (poll_interval > 0) {
739-
/* The timer does not have to be accurate. */
740-
set_timer_slack(&di->work.timer, poll_interval * HZ / 4);
738+
if (poll_interval > 0)
741739
schedule_delayed_work(&di->work, poll_interval * HZ);
742-
}
743740
}
744741

745742
/*

drivers/usb/host/ohci-hcd.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ static int ohci_init (struct ohci_hcd *ohci)
500500

501501
setup_timer(&ohci->io_watchdog, io_watchdog_func,
502502
(unsigned long) ohci);
503-
set_timer_slack(&ohci->io_watchdog, msecs_to_jiffies(20));
504503

505504
ohci->hcca = dma_alloc_coherent (hcd->self.controller,
506505
sizeof(*ohci->hcca), &ohci->hcca_dma, GFP_KERNEL);

drivers/usb/host/xhci.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,6 @@ static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci)
490490
xhci->comp_mode_recovery_timer.expires = jiffies +
491491
msecs_to_jiffies(COMP_MODE_RCVRY_MSECS);
492492

493-
set_timer_slack(&xhci->comp_mode_recovery_timer,
494-
msecs_to_jiffies(COMP_MODE_RCVRY_MSECS));
495493
add_timer(&xhci->comp_mode_recovery_timer);
496494
xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
497495
"Compliance mode recovery timer initialized");

include/linux/timer.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct timer_list {
1919
void (*function)(unsigned long);
2020
unsigned long data;
2121
u32 flags;
22-
int slack;
2322

2423
#ifdef CONFIG_TIMER_STATS
2524
int start_pid;
@@ -73,7 +72,6 @@ struct timer_list {
7372
.expires = (_expires), \
7473
.data = (_data), \
7574
.flags = (_flags), \
76-
.slack = -1, \
7775
__TIMER_LOCKDEP_MAP_INITIALIZER( \
7876
__FILE__ ":" __stringify(__LINE__)) \
7977
}
@@ -193,8 +191,6 @@ extern int del_timer(struct timer_list * timer);
193191
extern int mod_timer(struct timer_list *timer, unsigned long expires);
194192
extern int mod_timer_pending(struct timer_list *timer, unsigned long expires);
195193

196-
extern void set_timer_slack(struct timer_list *time, int slack_hz);
197-
198194
/*
199195
* The jiffies value which is added to now, when there is no timer
200196
* in the timer wheel:

kernel/time/timer.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -447,24 +447,6 @@ unsigned long round_jiffies_up_relative(unsigned long j)
447447
}
448448
EXPORT_SYMBOL_GPL(round_jiffies_up_relative);
449449

450-
/**
451-
* set_timer_slack - set the allowed slack for a timer
452-
* @timer: the timer to be modified
453-
* @slack_hz: the amount of time (in jiffies) allowed for rounding
454-
*
455-
* Set the amount of time, in jiffies, that a certain timer has
456-
* in terms of slack. By setting this value, the timer subsystem
457-
* will schedule the actual timer somewhere between
458-
* the time mod_timer() asks for, and that time plus the slack.
459-
*
460-
* By setting the slack to -1, a percentage of the delay is used
461-
* instead.
462-
*/
463-
void set_timer_slack(struct timer_list *timer, int slack_hz)
464-
{
465-
timer->slack = slack_hz;
466-
}
467-
EXPORT_SYMBOL_GPL(set_timer_slack);
468450

469451
static inline unsigned int timer_get_idx(struct timer_list *timer)
470452
{
@@ -775,7 +757,6 @@ static void do_init_timer(struct timer_list *timer, unsigned int flags,
775757
{
776758
timer->entry.pprev = NULL;
777759
timer->flags = flags | raw_smp_processor_id();
778-
timer->slack = -1;
779760
#ifdef CONFIG_TIMER_STATS
780761
timer->start_site = NULL;
781762
timer->start_pid = -1;

lib/random32.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ static void __prandom_timer(unsigned long dontcare)
233233

234234
static void __init __prandom_start_seed_timer(void)
235235
{
236-
set_timer_slack(&seed_timer, HZ);
237236
seed_timer.expires = jiffies + msecs_to_jiffies(40 * MSEC_PER_SEC);
238237
add_timer(&seed_timer);
239238
}

0 commit comments

Comments
 (0)