cvs commit: src/sys/vm vm_zeroidle.c
John Baldwin
jhb at FreeBSD.org
Mon Nov 1 11:31:20 PST 2004
On Monday 01 November 2004 05:51 am, Alfred Perlstein wrote:
> * Alan Cox <alc at cs.rice.edu> [041031 20:53] wrote:
> > On Sun, Oct 31, 2004 at 07:13:17PM -0800, Alfred Perlstein wrote:
> > > * Alan Cox <alc at FreeBSD.org> [041031 11:33] wrote:
> > > > alc 2004-10-31 19:32:57 UTC
> > > >
> > > > FreeBSD src repository
> > > >
> > > > Modified files:
> > > > sys/vm vm_zeroidle.c
> > > > Log:
> > > > Introduce a Boolean variable wakeup_needed to avoid repeated,
> > > > unnecessary calls to wakeup() by vm_page_zero_idle_wakeup().
> > > >
> > > > Revision Changes Path
> > > > 1.31 +9 -2 src/sys/vm/vm_zeroidle.c
> > >
> > > Why not switch to a cv?
> >
> > Calling cv_signal repeatedly would be no better than calling wakeup()
> > repeatedly. Either way, a Boolean variable is desirable to prevent
> > unnecessary calls.
>
> Yah, I figured there would be something in the cv code to optimize
> the "no waiters" case.
There is, though sometimes it might think there are waiters when there
actually aren't any.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the cvs-src
mailing list