mm: memcontrol: remove BUG_ON in uncharge_list
Subsystems (3)
PATCH 1/1 mm: memcontrol: remove BUG_ON in uncharge_list
From: Li RongQing <[email protected]>
when call uncharge_list, if a page is transparent huge, and not need to BUG_ON about non-transparent huge, since nobody should be be seeing the page at this stage and this page cannot be raced with a THP split up
--- mm/memcontrol.c | 1 - 1 file changed, 1 deletion(-)
mm/memcontrol.c +0 -1
@@ -5457,7 +5457,6 @@ static void uncharge_list(struct list_head *page_list)if (PageTransHuge (page)) { nr_pages <<=compound_order (page); -VM_BUG_ON_PAGE (!PageTransHuge (page), page); nr_huge += nr_pages; }
Signature · 1 line
2.1.4
Michal Hocko
maintainerQuoted 5 lines · On Wed 08-06-16 15:00:48, [email protected]…
From: Li RongQing <[email protected]>
when call
uncharge_list, if a page is transparent huge, and not need toBUG_ONabout non-transparent huge, since nobody should be be seeing the page at this stage and this page cannot be raced with a THP split up
Johannes do you remember why you have kept this bug on even after 0a31bc97c80c ("mm: memcontrol: rewrite uncharge API")?
Quoted 19 lines
Signed-off-by Li RongQing <[email protected]>--- mm/memcontrol.c | 1 - 1 file changed, 1 deletion(-)mm/memcontrol.c +0
-1@@ -5457,7 +5457,6 @@ static void uncharge_list(struct list_head *page_list)if (PageTransHuge (page)) { nr_pages <<=compound_order (page); -VM_BUG_ON_PAGE (!PageTransHuge (page), page); nr_huge += nr_pages; }Signature · 1 line
2.1.4
Signature · 2 lines
Michal Hocko SUSE Labs
Quoted 9 lines · Michal Hocko
Quoted 5 lines · On Wed 08-06-16 15:00:48, [email protected] wrote:
From: Li RongQing <[email protected]>
when call
uncharge_list, if a page is transparent huge, and not need toBUG_ONabout non-transparent huge, since nobody should be be seeing the page at this stage and this page cannot be raced with a THP split upJohannes do you remember why you have kept this bug on even after
0a31bc97c80c("mm: memcontrol: rewrite uncharge API")?
No, I just copied it over without thinking too much about it. That patch was pretty drastic, so why not keep the sanity checks in case one of the many assumptions it made were flawed...
But it's probably okay to drop it at this point.
Quoted 1 line
Quoted 1 line
Signed-off-by Li RongQing <[email protected]>
--
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 8 lines · Johannes Weiner
Quoted 7 lines · Michal Hocko
Quoted 5 lines · On Wed 08-06-16 15:00:48, [email protected]…
From: Li RongQing <[email protected]>
when call
uncharge_list, if a page is transparent huge, and not need toBUG_ONabout non-transparent huge, since nobody should be be seeing the page at this stage and this page cannot be raced with a THP split up
Quoted 6 lines
Quoted 2 lines
Johannes do you remember why you have kept this bug on even after
0a31bc97c80c("mm: memcontrol: rewrite uncharge API")?No, I just copied it over without thinking too much about it. That patch was pretty drastic, so why not keep the sanity checks in case one of the many assumptions it made were flawed...
Yeah the VM_BUG_ON made sense before because the charge could have gone away while the page could be visible, thus split.
Quoted 1 line
But it's probably okay to drop it at this point.
Thanks for double checking. I was just not sure I didn't miss anything. I am always a bit nervous when bug_ons a removed.
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Li RongQing <[email protected]>Acked-by Johannes Weiner <[email protected]>
With the reference to the rewrite which made it pointless
Signature · 2 lines
Michal Hocko SUSE Labs