Subject: Re: pmap_is_referenced() -- not used?
To: Jason R Thorpe <thorpej@zembu.com>
From: Greywolf <greywolf@starwolf.com>
List: tech-kern
Date: 01/24/2001 15:15:37
On Wed, 24 Jan 2001, Jason R Thorpe wrote:
#
# On Wed, Jan 24, 2001 at 11:53:07AM -0800, Jason R Thorpe wrote:
#
# > if (pg is referenced)
# > clear reference;
# > else {
# > /* NOTE: PAGE IS NOT PROTECTED IN ANY WAY! */
# > move page to inactive list;
# > }
#
# Sorry, this block was sort of un-clear. I really mean:
Actually, the first time made more sense to me; why do you need
to clear a reference that doesn't exist?
If you're doing that, you might as well say:
clear reference;
if (!pg is referenced) {
move page to inactive list;
}
and save yourself the trouble of the else.
At least that's what I garner from the code.
# if (pg is referenced)
# clear reference;
# else {
# /* NOTE: DO NOT CHANGE PAGE'S PROTECTION! */
# clear reference;
# move page to inactive list;
# }
#
--*greywolf;
--
*BSD: the power to swerve (penguins, worse than cane toads).