* [patch] mm: fix assertion
@ 2009-01-14 6:28 Nick Piggin
2009-01-15 17:35 ` Christoph Lameter
0 siblings, 1 reply; 3+ messages in thread
From: Nick Piggin @ 2009-01-14 6:28 UTC (permalink / raw)
To: Linus Torvalds, Linux Memory Management List
(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.
Signed-off-by: Nick Piggin <npiggin@suse.de>
---
Index: linux-2.6/include/linux/mm.h
===================================================================
--- linux-2.6.orig/include/linux/mm.h 2009-01-05 14:53:29.000000000 +1100
+++ linux-2.6/include/linux/mm.h 2009-01-05 14:53:54.000000000 +1100
@@ -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 majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] mm: fix assertion
2009-01-14 6:28 [patch] mm: fix assertion Nick Piggin
@ 2009-01-15 17:35 ` Christoph Lameter
2009-01-16 2:57 ` Nick Piggin
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Lameter @ 2009-01-15 17:35 UTC (permalink / raw)
To: Nick Piggin; +Cc: Linus Torvalds, Linux Memory Management List
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.
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
On Wed, 14 Jan 2009, Nick Piggin wrote:
> (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.
>
> Signed-off-by: Nick Piggin <npiggin@suse.de>
> ---
> Index: linux-2.6/include/linux/mm.h
> ===================================================================
> --- linux-2.6.orig/include/linux/mm.h 2009-01-05 14:53:29.000000000 +1100
> +++ linux-2.6/include/linux/mm.h 2009-01-05 14:53:54.000000000 +1100
> @@ -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 majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] mm: fix assertion
2009-01-15 17:35 ` Christoph Lameter
@ 2009-01-16 2:57 ` Nick Piggin
0 siblings, 0 replies; 3+ messages in thread
From: Nick Piggin @ 2009-01-16 2:57 UTC (permalink / raw)
To: Christoph Lameter; +Cc: Linus Torvalds, Linux Memory Management List
On Thu, Jan 15, 2009 at 11:35:45AM -0600, Christoph Lameter wrote:
> 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.
> Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Thanks
>
> On Wed, 14 Jan 2009, Nick Piggin wrote:
>
> > (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.
> >
> > Signed-off-by: Nick Piggin <npiggin@suse.de>
> > ---
> > Index: linux-2.6/include/linux/mm.h
> > ===================================================================
> > --- linux-2.6.orig/include/linux/mm.h 2009-01-05 14:53:29.000000000 +1100
> > +++ linux-2.6/include/linux/mm.h 2009-01-05 14:53:54.000000000 +1100
> > @@ -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 majordomo@kvack.org. For more info on Linux MM,
> > see: http://www.linux-mm.org/ .
> > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
> >
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-16 2:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14 6:28 [patch] mm: fix assertion Nick Piggin
2009-01-15 17:35 ` Christoph Lameter
2009-01-16 2:57 ` Nick Piggin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).