Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Thomas Gleixner: "This update provides the following changes: - The rework of the timer wheel which addresses the shortcomings of the current wheel (cascading, slow search for next expiring timer, etc). That's the first major change of the wheel in almost 20 years since Finn implemted it. - A large overhaul of the clocksource drivers init functions to consolidate the Device Tree initialization - Some more Y2038 updates - A capability fix for timerfd - Yet another clock chip driver - The usual pile of updates, comment improvements all over the place" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (130 commits) tick/nohz: Optimize nohz idle enter clockevents: Make clockevents_subsys static clocksource/drivers/time-armada-370-xp: Fix return value check timers: Implement optimization for same expiry time in mod_timer() timers: Split out index calculation timers: Only wake softirq if necessary timers: Forward the wheel clock whenever possible timers/nohz: Remove pointless tick_nohz_kick_tick() function timers: Optimize collect_expired_timers() for NOHZ timers: Move __run_timers() function timers: Remove set_timer_slack() leftovers timers: Switch to a non-cascading wheel timers: Reduce the CPU index space to 256k timers: Give a few structs and members proper names hlist: Add hlist_is_singular_node() helper signals: Use hrtimer for sigtimedwait() timers: Remove the deprecated mod_timer_pinned() API timers, net/ipv4/inet: Initialize connection request timers as pinned timers, drivers/tty/mips_ejtag: Initialize the poll timer as pinned timers, drivers/tty/metag_da: Initialize the poll timer as pinned ...
This commit is contained in:
@@ -603,7 +603,7 @@ static void reqsk_timer_handler(unsigned long data)
|
||||
if (req->num_timeout++ == 0)
|
||||
atomic_dec(&queue->young);
|
||||
timeo = min(TCP_TIMEOUT_INIT << req->num_timeout, TCP_RTO_MAX);
|
||||
mod_timer_pinned(&req->rsk_timer, jiffies + timeo);
|
||||
mod_timer(&req->rsk_timer, jiffies + timeo);
|
||||
return;
|
||||
}
|
||||
drop:
|
||||
@@ -617,8 +617,9 @@ static void reqsk_queue_hash_req(struct request_sock *req,
|
||||
req->num_timeout = 0;
|
||||
req->sk = NULL;
|
||||
|
||||
setup_timer(&req->rsk_timer, reqsk_timer_handler, (unsigned long)req);
|
||||
mod_timer_pinned(&req->rsk_timer, jiffies + timeout);
|
||||
setup_pinned_timer(&req->rsk_timer, reqsk_timer_handler,
|
||||
(unsigned long)req);
|
||||
mod_timer(&req->rsk_timer, jiffies + timeout);
|
||||
|
||||
inet_ehash_insert(req_to_sk(req), NULL);
|
||||
/* before letting lookups find us, make sure all req fields
|
||||
|
@@ -188,7 +188,8 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,
|
||||
tw->tw_prot = sk->sk_prot_creator;
|
||||
atomic64_set(&tw->tw_cookie, atomic64_read(&sk->sk_cookie));
|
||||
twsk_net_set(tw, sock_net(sk));
|
||||
setup_timer(&tw->tw_timer, tw_timer_handler, (unsigned long)tw);
|
||||
setup_pinned_timer(&tw->tw_timer, tw_timer_handler,
|
||||
(unsigned long)tw);
|
||||
/*
|
||||
* Because we use RCU lookups, we should not set tw_refcnt
|
||||
* to a non null value before everything is setup for this
|
||||
@@ -248,7 +249,7 @@ void __inet_twsk_schedule(struct inet_timewait_sock *tw, int timeo, bool rearm)
|
||||
|
||||
tw->tw_kill = timeo <= 4*HZ;
|
||||
if (!rearm) {
|
||||
BUG_ON(mod_timer_pinned(&tw->tw_timer, jiffies + timeo));
|
||||
BUG_ON(mod_timer(&tw->tw_timer, jiffies + timeo));
|
||||
atomic_inc(&tw->tw_dr->tw_count);
|
||||
} else {
|
||||
mod_timer_pending(&tw->tw_timer, jiffies + timeo);
|
||||
|
Reference in New Issue
Block a user