Commit 9549db1d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] rmap comments

From: Hugh Dickins <hugh@veritas.com>

Update a few locking comments in rmap.c.
parent 8e98702b
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
/* /*
* Locking: * Locking:
* - the page->pte.chain is protected by the PG_chainlock bit, * - the page->pte.chain is protected by the PG_chainlock bit,
* which nests within the zone->lru_lock, then the * which nests within the the mm->page_table_lock,
* mm->page_table_lock, and then the page lock. * which nests within the page lock.
* - because swapout locking is opposite to the locking order * - because swapout locking is opposite to the locking order
* in the page fault path, the swapout path uses trylocks * in the page fault path, the swapout path uses trylocks
* on the mm->page_table_lock * on the mm->page_table_lock
...@@ -287,9 +287,8 @@ void page_remove_rmap(struct page *page, pte_t *ptep) ...@@ -287,9 +287,8 @@ void page_remove_rmap(struct page *page, pte_t *ptep)
* table entry mapping a page. Because locking order here is opposite * table entry mapping a page. Because locking order here is opposite
* to the locking order used by the page fault path, we use trylocks. * to the locking order used by the page fault path, we use trylocks.
* Locking: * Locking:
* zone->lru_lock page_launder() * page lock shrink_list(), trylock
* page lock page_launder(), trylock * pte_chain_lock shrink_list()
* pte_chain_lock page_launder()
* mm->page_table_lock try_to_unmap_one(), trylock * mm->page_table_lock try_to_unmap_one(), trylock
*/ */
static int FASTCALL(try_to_unmap_one(struct page *, pte_addr_t)); static int FASTCALL(try_to_unmap_one(struct page *, pte_addr_t));
...@@ -376,8 +375,8 @@ static int try_to_unmap_one(struct page * page, pte_addr_t paddr) ...@@ -376,8 +375,8 @@ static int try_to_unmap_one(struct page * page, pte_addr_t paddr)
* @page: the page to get unmapped * @page: the page to get unmapped
* *
* Tries to remove all the page table entries which are mapping this * Tries to remove all the page table entries which are mapping this
* page, used in the pageout path. Caller must hold zone->lru_lock * page, used in the pageout path. Caller must hold the page lock
* and the page lock. Return values are: * and its pte chain lock. Return values are:
* *
* SWAP_SUCCESS - we succeeded in removing all mappings * SWAP_SUCCESS - we succeeded in removing all mappings
* SWAP_AGAIN - we missed a trylock, try again later * SWAP_AGAIN - we missed a trylock, try again later
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment