On 9/8/21 11:11 AM, Juergen Gross wrote: > On 08.09.21 16:47, Boris Ostrovsky wrote: >> >> >> Given that wait_event_interruptible_timeout() is a bunch of nested macros do >> we need to worry here about overly aggressive compiler optimizing out >> 'credit = current_credit()'? > > I don't think so. current_credit() is reading from balloon_stats, which > is a global variable. So the compiler shouldn't assume the contents > won't change.
Ah, ok --- good point. Then I guess we should be fine. Reviewed-by: Boris Ostrovsky <[email protected]> > > But I can add a barrier() after 'credit = current_credit()' in case > you'd feel uneasy without it. > > > Juergen
