Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2000 12:14:57 -0600
From:      cort@fsmlabs.com
To:        Lars Eggert <larse@ISI.EDU>
Cc:        Alan Cox <alc@cs.rice.edu>, hackers@freebsd.org
Subject:   Re: clearing pages in the idle loop
Message-ID:  <20000721121457.R26237@medea.fsmlabs.com>
In-Reply-To: <39788E48.60F8A59F@isi.edu>; from larse@ISI.EDU on Fri, Jul 21, 2000 at 10:54:16AM -0700
References:  <20000719234124.H14543@cs.rice.edu> <39788E48.60F8A59F@isi.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
We started losing performance with the idle page clearing so
I've disabled it and haven't done much with it in quite a while.  The code
has fallen into disrepair and some has been removed in the latest
versions.  I'd suggest looking at the early 2.3.x and 2.2.1[23] series of
Linux kernels.  That's where it was doing its best.

We've also found that using dcbz, which zeros cache lines directly,
actually improves performance.  That is contradictory to one of the
conclusions I drew in that paper.  My conjecture was that the zero'd pages
would not be used often since a process given a fresh page wouldn't read
from it before a write.

I still do think the idle page zero-ing can be useful, though.  If you do
some work with BSD on this please let me know.  I'd like to follow along
since I've been playing with BSD lately.
	
} Do you still have those FreeBSD patches, Alan? I'd be interested in doing
} some more experiments with that code.
}
} That makes sense. Other factors that may have an impact:
} 
}   * if you always have enough zeroed pages remaining over your 
}     benchmark (> ~1/2 free pages), FreeBSD will never do the 
}     idle-time zeroing

How do you keep track of what parts of a page are used?  In Linux I was
just pulling pages off the free-list and zero-ing them.  Do you have a
bitmap of used regions within pages on BSD?

}   * it looks to me as if Cort's Linux code will always zero whole 
}     pages, while the FreeBSD code is a little smarter and only zeroes 
}     used regions of a page (less impact on caches?)
} 
}   * cache size differences between PPC and i386?

Right, those won't be cached if the page is marked non-cacheable.

} I'm looking at Cort's code (arch/ppc/kernel/idle.c), and while he turns off
} the caching for pages he zeroes, I don't see him disabling the L1/2 caches
} explicitly. Is this implicit with setting the non-cacheable flag on the
} PPC? Also, idle-time zeroing is commented out in the version I'm looking at
} (1.68, 1999/10/15), where problems found after the paper was published?

I wanted a few bits for each page to describe its state: zero'd,
non-zero'd, busy being zero'd.  It would have taken some changes to the
non-arch Linux code to do that and at the time we were moving to a more
stable tree so I didn't continue with it.  It sounds as though you have a
framework for doing that sort of thing (and more) with BSD.  Can you send
me a pointer to the sources you're using?  I'd like to look into it.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000721121457.R26237>