From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755667AbbDOJzS (ORCPT ); Wed, 15 Apr 2015 05:55:18 -0400 Received: from casper.infradead.org ([85.118.1.10]:34215 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753830AbbDOJzN (ORCPT ); Wed, 15 Apr 2015 05:55:13 -0400 Message-Id: <20150415094155.601987867@infradead.org> User-Agent: quilt/0.61-1 Date: Wed, 15 Apr 2015 11:41:55 +0200 From: Peter Zijlstra To: tglx@linutronix.de Cc: mingo@kernel.org, peterz@infradead.org, eranian@google.com, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] hrtimer (related) fixes Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, I spoke to you about these patches/bugs a fair few months ago but never got around to properly fixing them. With your recent hrtimer work it got a lot simpler, thanks! So here are 3 patches, the first of which fixes a hrtimer bug that should be much easier to expose after the next two patches. The second one attempts to clean up some brainmelt in the CFS bandwidth timer; the 'problem' there is that do not want to loose either the timer or a period. - one could loose the timer by observing it active and not (re)starting it while the callback had already decided to NORESTART. - one could loose a period by having the restart forward the expiry time such that the handler would not observe the overrun and properly account for it. This is now all solved by not forwarding the timer from (re)start when active and then unconditionally starting it. Yay for being able to start expired timers -- note that it should still be very rare, since when the timer is active it will most likely have just forwarded the expiry time from the handler. But note that unconditionally starting the timer would have easily triggered the bug fixed by the first patch. The third patch is an alternative to the perf patch you send out a few days ago; it got stuck in this queue because it too suffers from these problems, albeit at a much reduced risk because the code in question is 'never' triggered (as demonstrated by this fail being there forever).