Messages in this thread Patch in this message | | | Date | Tue, 25 Mar 2003 22:12:08 +0000 (GMT) | From | Hugh Dickins <> | Subject | [PATCH] swap 02/13 !CONFIG_SWAP try_to_unmap |
| |
Raised #endif CONFIG_SWAP in shrink_list, it was excluding try_to_unmap of file pages. Suspect !CONFIG_MMU relied on that to suppress try_to_unmap, added SWAP_FAIL stub for it.
--- swap01/include/linux/swap.h Tue Mar 25 20:42:56 2003 +++ swap02/include/linux/swap.h Tue Mar 25 20:43:07 2003 @@ -175,19 +175,18 @@ void FASTCALL(page_remove_rmap(struct page *, pte_t *)); int FASTCALL(try_to_unmap(struct page *)); -/* return values of try_to_unmap */ -#define SWAP_SUCCESS 0 -#define SWAP_AGAIN 1 -#define SWAP_FAIL 2 - /* linux/mm/shmem.c */ extern int shmem_unuse(swp_entry_t entry, struct page *page); - #else -#define page_referenced(page) \ - TestClearPageReferenced(page) +#define page_referenced(page) TestClearPageReferenced(page) +#define try_to_unmap(page) SWAP_FAIL #endif /* CONFIG_MMU */ +/* return values of try_to_unmap */ +#define SWAP_SUCCESS 0 +#define SWAP_AGAIN 1 +#define SWAP_FAIL 2 + #ifdef CONFIG_SWAP /* linux/mm/page_io.c */ extern int swap_readpage(struct file *, struct page *); --- swap01/mm/vmscan.c Tue Mar 25 20:42:56 2003 +++ swap02/mm/vmscan.c Tue Mar 25 20:43:07 2003 @@ -277,6 +277,7 @@ pte_chain_lock(page); mapping = page->mapping; } +#endif /* CONFIG_SWAP */ /* * The page is mapped into the page tables of one or more @@ -294,7 +295,6 @@ ; /* try to free the page below */ } } -#endif /* CONFIG_SWAP */ pte_chain_unlock(page); /* - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |