mm: fix assertion
Subsystems (2)
PATCH 1/1 mm: fix assertion
(I ran into this when debugging the lockless pagecache barrier problem btw)
--
This assertion is incorrect for lockless pagecache. By definition if we have an unpinned page that we are trying to take a speculative reference to, it may become the tail of a compound page at any time (if it is freed, then reallocated as a compound page).
It was still a valid assertion for the vmscan.c LRU isolation case, but it doesn't seem incredibly helpful... if somebody wants it, they can put it back directly where it applies in the vmscan code.
---
include/linux/mm.h +0 -1
@@ -270,7 +270,6 @@ static inline int put_page_testzero(stru*/ static inline int get_page_unless_zero (struct page *page) { -VM_BUG_ON (PageTail (page));return atomic_inc_not_zero (&page->_count); }
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
You still have a
VM_BUG_ON(PageTail(page));
in page_cache_get_speculative() which will verify that the successfully acquired speculative reference is not a compound tail.
Quoted 29 lines · Nick Piggin
(I ran into this when debugging the lockless pagecache barrier problem btw)
--
This assertion is incorrect for lockless pagecache. By definition if we have an unpinned page that we are trying to take a speculative reference to, it may become the tail of a compound page at any time (if it is freed, then reallocated as a compound page).
It was still a valid assertion for the
vmscan.cLRU isolation case, but it doesn't seem incredibly helpful... if somebody wants it, they can put it back directly where it applies in the vmscan code.Signed-off-by Nick Piggin <[email protected]>---
Index:linux-2.6/include/linux/mm.h
===================================================================include/linux/mm.h +0
-2@@ -270,7 +270,6 @@ static inline int put_page_testzero(stru*/ static inline int get_page_unless_zero (struct page *page) { -VM_BUG_ON (PageTail (page));return atomic_inc_not_zero (&page->_count); } --
Quoted 5 lines
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Christoph Lameter
You still have a
VM_BUG_ON(PageTail(page));in
page_cache_get_speculative()which will verify that the successfully acquired speculative reference is not a compound tail.
Good point.
Quoted 1 line
Reviewed-by Christoph Lameter <[email protected]>
Thanks
Quoted 31 lines · Nick Piggin
Quoted 29 lines
(I ran into this when debugging the lockless pagecache barrier problem btw)
--
This assertion is incorrect for lockless pagecache. By definition if we have an unpinned page that we are trying to take a speculative reference to, it may become the tail of a compound page at any time (if it is freed, then reallocated as a compound page).
It was still a valid assertion for the
vmscan.cLRU isolation case, but it doesn't seem incredibly helpful... if somebody wants it, they can put it back directly where it applies in the vmscan code.Signed-off-by Nick Piggin <[email protected]>---
Index:linux-2.6/include/linux/mm.h
===================================================================include/linux/mm.h +0
-1@@ -270,7 +270,6 @@ static inline int put_page_testzero(stru*/ static inline int get_page_unless_zero (struct page *page) { -VM_BUG_ON (PageTail (page));return atomic_inc_not_zero (&page->_count); }
Quoted 6 lines
Quoted 6 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>