Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1448582
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch 4 15/22] timer: Remove slack leftovers |
| Date | 2016-07-22 15:10 +0200 |
| Message-ID | <rXInf-6hr-1@gated-at.bofh.it> (permalink) |
| References | <rR8Pv-419-7@gated-at.bofh.it> <rR8Pv-419-27@gated-at.bofh.it> <rXGYa-5de-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 22 Jul 2016, Jason A. Donenfeld wrote: > Thomas Gleixner <tglx@linutronix.de> writes: > > We now have implicit batching in the timer wheel. The slack is not longer > > used. Remove it. > >From a brief look at timer.c, it looked like __mod_timer was rather > expensive. So, as an optimization, I wanted the "timer_pending(timer) > && timer->expires == expires" condition to be hit in most of the > cases. I accomplished this by doing: > > set_timer_slack(timer, HZ / 4); > > This ensured that we'd only wind up calling __mod_timer 4 times per > second, at most. > > With the removal of the slack concept, I no longer can do this. I > haven't reviewed this series in depth, but I'm wondering if you'd > recommend a different optimization instead. Or, have things been Well, this really depends on the TIMEOUT value you have. The code now does implicit batching for larger timeouts by queueing the timers into wheels with coarse grained granularity. As long as your new TIMEOUT value ends up in the same bucket then that's equivalent to the slack thing. Can you give me a ballpark of your TIMEOUT value? > reworked so much, that calling mod_timer is now always inexpensive? When you take the slow (queueing) path, it's still expensive, not as bad as the previous one, but not really cheap either. Thanks, tglx
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [patch 4 15/22] timer: Remove slack leftovers "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-07-22 13:40 +0200
Re: [patch 4 15/22] timer: Remove slack leftovers Thomas Gleixner <tglx@linutronix.de> - 2016-07-22 15:10 +0200
Re: [patch 4 15/22] timer: Remove slack leftovers "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-07-22 17:20 +0200
Re: [patch 4 15/22] timer: Remove slack leftovers "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-07-23 01:00 +0200
csiph-web