From: Jeff D. <jd...@ka...> - 2001-12-13 20:44:39
|
rc...@im... said: > 4. the page that this pte was previously set is added to swap cache > indexed by the --> 0x3307c <-- address, ie, page->index = 0x3307c. This seems like a bug. The low pte bits are arch-specific, and as far as you're concerned, they should be considered random. The arch can fiddle those bits at any time for any reason. Why aren't you using page->index == SWP_OFFSET(pte)? > 4. we read this page from disk. The correct block on disk is computed > correctly since SWP_TYPE and SWP_OFFSET macros strips out those last > two bits, but it returns _bogus_ data. Because the page had never been written out to disk in the first place, I take it? > Only user-level apps have ptes set to swap entries, so in order to one > of these ptes to fault an address, it must have run for a while. At the very least, flush_tlb_page should have been called when the pte was marked as being swapped. That should have unmapped the page and cleared the newpage bit. Jeff |