adaptive serialize enter

Sepherosa Ziehau sepherosa at gmail.com
Sun May 4 04:28:27 PDT 2008


On Sun, May 4, 2008 at 7:12 PM, Simon 'corecode' Schubert
<corecode at fs.ei.tum.de> wrote:
> Sepherosa Ziehau wrote:
>
> > http://leaf.dragonflybsd.org/~sephe/lwkt_serialize.c.diff
> >
>
>
> > +    crit_enter();
> > +    tsleep_interlock(s);
> > +    if (atomic_intr_cond_test(&s->interlock) != 0) {
> > +#ifdef PROFILE_SERIALIZER
> > +       s->sleep_cnt++;
> > +#endif
> > +       logslz(sleep_beg, s);
> > +       tsleep(s, 0, "slize", 0);
> > +       logslz(sleep_end, s);
> > +    }
> > +    crit_exit();
> >
>
>  Are you allowed to call tsleep_interlock() without doing a tsleep
> afterwards?

It is allowed.  Exact wakeup does not depend on it.  It may only
generate extra ipi traffic, afaik.

Best Regards,
sephe

-- 
Live Free or Die





More information about the Submit mailing list