Re: [PATCH v3 33/57] perf: Simplify perf_adjust_freq_unthr_context()

From: Peter Zijlstra
Date: Mon Jun 12 2023 - 16:05:50 EST


On Mon, Jun 12, 2023 at 11:55:57AM -0700, Linus Torvalds wrote:

> So while it might not be the horrible bug I thought it was, I'd
> _really_ like us to not do those things just from a sanity angle.

OK, let me go see if there's another way to sanely write those.


Is this less offensive?

restart:
scoped_guard (rcu) {
list_for_each_entry_rcu(..) {
...
if (err == -EAGAIN)
goto restart;
}
}


That has the explicit scope on the rcu and now the goto explicitly exist
it.

Gonna have to think what to do about the continue ...