Re: [PATCH 2/5] sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining

From: bsegall
Date: Wed Oct 16 2013 - 15:12:59 EST


Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:

> On Wed, Oct 16, 2013 at 11:16:17AM -0700, Ben Segall wrote:
>> + * Requires cfs_b->lock for hrtimer_expires_remaining to be safe against the
>> + * hrtimer base being cleared by __hrtimer_start_range_ns. This is possibly
>> + * incorrect if we ever built with CPU_HOTPLUG.
>
> Do clarify; most people build with hotplug enabled; due to wanting
> suspend/resume stuff etc..

Whoops, that comment turned out to be incorrect anyway - I was worried
about migrate_timers, but it is safe as it is. The following should be
accurate:

+ * Requires cfs_b->lock for hrtimer_expires_remaining to be safe against the
+ * hrtimer base being cleared by __hrtimer_start_range_ns. In the case of
+ * migrate_hrtimers, base is never cleared, so we are fine.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/