swap question

Bill Hawes (whawes@star.net)
Mon, 25 Aug 1997 16:55:45 -0400


In studying the swap code I'm puzzled why the page->pg_swap_entry isn't
cleared when we do a delete_from_swap_cache. The delete should release
the swap page so that no future access would be valid, but there are
places (in unuse_pte) that test pg_swap_entry field and take actions on
it.

If it's not being cleared for performance reasons, then all accesses to
the value should be made only after testing the PG_swap_cache bit to see
whether it's actually valid. (I think it would be simpler to just clear
it though.)

Have I missed something here?

Regards,
Bill