Skip to content

RFC hrtimer breakage

Peter Zijlstra linux-arch lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Fix many ARM timer handlersarch/arm/kernel/time.c arch/arm/mach-aaec2000/core.c arch/arm/mach-clps711x/time.c +18 more+2 -710 replies
2/2xtime_lock vs update_process_timesarch/alpha/kernel/time.c arch/arm/common/time-acorn.c arch/arm/mach-at91/at91sam926x_time.c +11 more+60 -625 replies

Reviews trailers per patch

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

PatchGreg UngererIvan Kokshaysky
1/2
2/2A-b A-b

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

Read the v1 thread

Cover letter [RFC][PATCH 0/2] hrtimer breakage

Hi,

If you're in the To: field, I broke your arch with (post .24) commit:
d3d74453c34f8fd87674a8cf5b8a327c68f22e99

So, to be clear, that broke:
alpha, arm, blackfin, frv, m68knommu, sh, sh64 and sparc

The deadlock resulting was found by Russell:

IRQ handle

    -> timer_tick() - xtime seqlock held for write
      -> update_process_times() 
        -> run_local_timers()
          -> hrtimer_run_queues()
            -> hrtimer_get_softirq_time() - tries to get a read lock

Now, Thomas assures me the fix is trivial, only do_timer() needs to be done under the xtime_lock, and update_process_times() can savely be removed from under it.

So that is what the next two patches do, the first patch is by Russell and covers most of the arm sub-arch, the second one does the other archs and a few arm archs that were missed by rmk.

This patch should probably be folded into one, or at least the arm bits from the second moved to the first patch, to avoid more bisect breakage.

If you're all ok I'll polish the patches (maybe one per arch?) and ask for merger.

(for obvious reasons I'm unable to actually test any of this)

Peter