lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RT] WARNING at hrtimer_start_range_ns
On 2022-06-15 16:53:55 [+0200], Juri Lelli wrote:
> Hi,
Hi,

> My understanding is that we have
>
> fs/aio.c::read_events
> wait_event_interruptible_hrtimeout
> __wait_event_hrtimeout
> hrtimer_init_sleeper_on_stack <- this might mode |=HRTIMER_MODE_HARD on RT

will set HRTIMER_MODE_HARD of might set HRTIMER_MODE_HARD if the task has elevated priority
(RT/DL).

> hrtimer_start_range_ns
> WARN_ON_ONCE(!(mode & HRTIMER_MODE_HARD) ^ !timer->is_hard)
> fires since the latter doesn't see the change of mode done by
> init_sleeper

correct.

> The attached patch seems to cure the problem, although I'm not entirely
> sure it's the cleanest fix (if I'm right at all about it :).

The problem seems to be that __wait_event_hrtimeout() does
hrtimer_start_range_ns() instead of hrtimer_sleeper_start_expires(). So
if you switch that, then it should go away.

> Thanks,
> Juri

Sebastian

\
 
 \ /
  Last update: 2022-06-23 12:48    [W:0.046 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site