DragonFly submit List (threaded) for 2008-05
DragonFly BSD
DragonFly submit List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: adaptive serialize enter


From: "Sepherosa Ziehau" <sepherosa@xxxxxxxxx>
Date: Sun, 4 May 2008 19:27:59 +0800

On Sun, May 4, 2008 at 7:12 PM, Simon 'corecode' Schubert
<corecode@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]