On Fri, Oct 25, 2019 at 9:22 AM Nick Desaulniers <ndesaulniers@xxxxxxxxxx> wrote: > > +static void scs_free(void *s) > > +{ > > + int i; > > + > > + for (i = 0; i < SCS_CACHE_SIZE; i++) { > > + if (this_cpu_cmpxchg(scs_cache[i], 0, s) != 0) > > + continue; > > + > > + return; > > + } > > prefer: > > for ...: > if foo() == 0: > return > > to: > > for ...: > if foo() != 0: > continue > return This was essentially copied from free_thread_stack in kernel/fork.c, but I agree, your way is cleaner. I'll change this in the next version. Thanks! Sami