Skip to content

timers/hrtimers: Cleanups & Fixes

Viresh Kumar lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest36 patches 1 replyIn review
  2. v114 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- few new patches:
- patches around for_each_active_base()
- hrtimer: call switch_hrtimer_base() after setting new expiry time
- Some other minor cleanups
- few patches are dropped
- few are merged together as they covered same stuff
- rebased all patches and moved the patches removing parameters or return values at the bottom, so that others can be applied easily. Though as per my last mail, it doesn't look like they are making the 'text' segments any bigger.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/36hrtimer: replace 'tab' with 'space' after 'comma'kernel/hrtimer.c+1 -10 replies
2/36hrtimer: Fix comment mistake over hrtimer_force_reprogram()kernel/hrtimer.c+1 -20 replies
3/36hrtimer: fix routine names in commentskernel/hrtimer.c+1 -10 replies
4/36hrtimer: remove {} around a single liner 'for' loop in migrate_hrtimers()kernel/hrtimer.c+1 -20 replies
5/36hrtimer: Coalesce format fragments in printk()kernel/hrtimer.c+2 -20 replies
6/36hrtimer: remove dummy definition of hrtimer_force_reprogram()kernel/hrtimer.c+0 -20 replies
7/36hrtimer: replace sizeof(struct hrtimer) with sizeof(*timer)kernel/hrtimer.c+1 -10 replies
8/36hrtimer: move unlock_hrtimer_base() upwardskernel/hrtimer.c+6 -90 replies
9/36hrtimer: call hrtimer_set_expires_range() from hrtimer_set_expires_range_ns()include/linux/hrtimer.h+1 -20 replies
10/36hrtimer: use base->index instead of basenum in switch_hrtimer_base()kernel/hrtimer.c+1 -20 replies
11/36hrtimer: no need to rewrite '1' to hrtimer_hres_enabledkernel/hrtimer.c+1 -30 replies
12/36hrtimer: use base->hres_active directly instead of hrtimer_hres_active()kernel/hrtimer.c+2 -20 replies
13/36hrtimer: don't check state of base->hres_active in hrtimer_switch_to_hres()kernel/hrtimer.c+0 -30 replies
14/36hrtimer: reorder code in __remove_hrtimer()kernel/hrtimer.c+10 -110 replies
15/36hrtimer: don't emulate notifier call to initialize timer basekernel/hrtimer.c+1 -20 replies
16/36hrtimer: Create hrtimer_get_monoexpires()include/linux/hrtimer.h kernel/hrtimer.c+11 -60 replies
17/36hrtimer: don't check if timer is queued in __remove_hrtimer()kernel/hrtimer.c+1 -40 replies
18/36hrtimer: rewrite switch_hrtimer_base() to remove extra indentation levelkernel/hrtimer.c+26 -250 replies
19/36hrtimer: rewrite remove_hrtimer() to remove extra indentation levelkernel/hrtimer.c+22 -240 replies
20/36hrtimer: replace base by new_base to get resolution: __hrtimer_start_range_ns()kernel/hrtimer.c+1 -10 replies
21/36hrtimer: create base_on_this_cpu()kernel/hrtimer.c+6 -30 replies
22/36hrtimer: clear active_bases as soon as the timer is removedkernel/hrtimer.c+3 -20 replies
23/36hrtimer: create for_each_active_base()kernel/hrtimer.c+13 -00 replies
24/36hrtimer: Use for_each_active_base() to iterate over active clock baseskernel/hrtimer.c+23 -350 replies
25/36hrtimer: call hrtimer_get_softirq_time() only if cpu_base->active_bases is setkernel/hrtimer.c+4 -70 replies
26/36hrtimer: take lock only once for a cpu_base in hrtimer_run_queues()kernel/hrtimer.c+2 -20 replies
27/36hrtimer: call switch_hrtimer_base() after setting new expiry timekernel/hrtimer.c+6 -60 replies
28/36hrtimer: remove 'base' parameter from remove_timer() and __remove_timer()kernel/hrtimer.c+11 -150 replies
29/36hrtimer: remove 'base' parameter from switch_hrtimer_base()kernel/hrtimer.c+4 -50 replies
30/36hrtimer: remove 'base' parameter from enqueue_hrtimer()kernel/hrtimer.c+7 -70 replies
31/36hrtimer: remove 'base' parameter from hrtimer_{enqueue_}reprogram()kernel/hrtimer.c+6 -90 replies
32/36hrtimer: make switch_hrtimer_base() return voidkernel/hrtimer.c+7 -90 replies
33/36hrtimer: make lock_hrtimer_base() return voidkernel/hrtimer.c+6 -110 replies
34/36hrtimer: make enqueue_hrtimer() return voidinclude/linux/hrtimer.h kernel/hrtimer.c+9 -60 replies
35/36timer: simplify CPU_UP_PREPARE notifier code pathkernel/timer.c+1 -30 replies
36/36timer: don't emulate notifier call to initialize timer basekernel/timer.c+1 -70 replies

Reviews trailers per patch

1 of 36 patches has a Reviewed-by or Acked-by.

PatchSrivatsa S. Bhat
1/36
2/36
3/36
4/36
5/36
6/36
7/36
8/36
9/36
10/36
11/36
12/36
13/36
14/36
15/36
16/36
17/36
18/36
19/36
20/36
21/36
22/36
23/36
24/36
25/36
26/36
27/36
28/36
29/36
30/36
31/36
32/36
33/36
34/36
35/36R-b
36/36

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH V2 00/36] timers/hrtimers: Cleanups & Fixes

Hi Thomas,

I know you are not going to look at these before end of this merge window and you wanted to have a look at V1 before me posting these. But I am reposting them now due to these reasons:
- Need to resend my cpu isolation (cpuset.quiesce) patches which are based of these
- Few patches are dropped/merged/fixed/updated and so all the patches from V1 wouldn't have made sense
- There were some new patches as well which I wanted to send

These have gone through fair bit of testing via kbuild system maintained by Fengguang Wu.

These are some minor cleanups and potential bug fixes in there. These are based of tip/timers-core-for-linus ..

V1 of most of these patches (~28) were posted here:
https://lkml.org/lkml/2014/3/26/107
https://lkml.org/lkml/2014/3/28/148

V1->V2:
- few new patches:
- patches around for_each_active_base()
- hrtimer: call switch_hrtimer_base() after setting new expiry time
- Some other minor cleanups
- few patches are dropped
- few are merged together as they covered same stuff
- rebased all patches and moved the patches removing parameters or return values at the bottom, so that others can be applied easily. Though as per my last mail, it doesn't look like they are making the 'text' segments any bigger.

Viresh Kumar (36):
hrtimer: replace 'tab' with 'space' after 'comma'
hrtimer: Fix comment mistake over hrtimer_force_reprogram()
hrtimer: fix routine names in comments
hrtimer: remove {} around a single liner 'for' loop in
migrate_hrtimers()
hrtimer: Coalesce format fragments in printk()
hrtimer: remove dummy definition of hrtimer_force_reprogram()
hrtimer: replace sizeof(struct hrtimer) with sizeof(*timer)
hrtimer: move unlock_hrtimer_base() upwards
hrtimer: call hrtimer_set_expires_range() from
hrtimer_set_expires_range_ns()
hrtimer: use base->index instead of basenum in switch_hrtimer_base()
hrtimer: no need to rewrite '1' to hrtimer_hres_enabled
hrtimer: use base->hres_active directly instead of
hrtimer_hres_active()
hrtimer: don't check state of base->hres_active in
hrtimer_switch_to_hres()
hrtimer: reorder code in __remove_hrtimer()
hrtimer: don't emulate notifier call to initialize timer base
hrtimer: Create hrtimer_get_monoexpires()
hrtimer: don't check if timer is queued in __remove_hrtimer()
hrtimer: rewrite switch_hrtimer_base() to remove extra indentation
level
hrtimer: rewrite remove_hrtimer() to remove extra indentation level
hrtimer: replace base by new_base to get resolution:

    __hrtimer_start_range_ns()
  hrtimer: create base_on_this_cpu()
  hrtimer: clear active_bases as soon as the timer is removed
  hrtimer: create for_each_active_base()
  hrtimer: Use for_each_active_base() to iterate over active clock
    bases
  hrtimer: call hrtimer_get_softirq_time() only if
    cpu_base->active_bases is set
  hrtimer: take lock only once for a cpu_base in hrtimer_run_queues()
  hrtimer: call switch_hrtimer_base() after setting new expiry time
  hrtimer: remove 'base' parameter from remove_timer() and
    __remove_timer()

hrtimer: remove 'base' parameter from switch_hrtimer_base()
hrtimer: remove 'base' parameter from enqueue_hrtimer()
hrtimer: remove 'base' parameter from hrtimer_{enqueue_}reprogram()
hrtimer: make switch_hrtimer_base() return void
hrtimer: make lock_hrtimer_base() return void
hrtimer: make enqueue_hrtimer() return void
timer: simplify CPU_UP_PREPARE notifier code path
timer: don't emulate notifier call to initialize timer base

 include/linux/hrtimer.h |  14 +-
 kernel/hrtimer.c        | 365 ++++++++++++++++++++++--------------------------
 kernel/timer.c          |  12 +-
 3 files changed, 179 insertions(+), 212 deletions(-)
Signature · 1 line
1.7.12.rc2.18.g61b472e