Skip to contentSkip to conversation

mm: double mark_page_accessed() in read_cache_page_async()

PATCH In review Peter Zijlstra 2 participants 2 messages Jul 6, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: double mark_page_accessed() in read_cache_page_async()

read_cache_page_async() seems to have two invocations of mark_page_accessed() which will launch pages right onto the active list.

Remove the first one, keeping the latter one. This avoids marking unwanted pages active (in the retry loop).

---
 mm/filemap.c |    1 -
 1 file changed, 1 deletion(-)
mm/filemap.c +0 -1
Index: linux-2.6/mm/filemap.c
===================================================================
@@ -1588,7 +1588,6 @@ retry:
 	page = __read_cache_page(mapping, index, filler, data);
 	if (IS_ERR(page))
 		return page;
-	mark_page_accessed(page);
 	if (PageUptodate(page))
 		goto out;
 
maintainer
#1 lore raw
Quoted 17 lines · On Fri, 06 Jul 2007 18:03:54 +0200 Peter Zijlstra <[email protected]> wrote:

read_cache_page_async() seems to have two invocations of mark_page_accessed() which will launch pages right onto the active list.

Remove the first one, keeping the latter one. This avoids marking unwanted pages active (in the retry loop).

---
 mm/filemap.c |    1 -
 1 file changed, 1 deletion(-)

Index: linux-2.6/mm/filemap.c
===================================================================

mm/filemap.c retry: · line 1593

Quoted 7 lines
mm/filemap.c +0 -1
@@ -1588,7 +1588,6 @@ retry:
 	page = __read_cache_page(mapping, index, filler, data);
 	if (IS_ERR(page))
 		return page;
-	mark_page_accessed(page);
 	if (PageUptodate(page))
 		goto out;
 

Thanks for catching this. It is a post-2.6.21 regression.

We cannot afford to do stuff like this.