hugetlb: remove unnecessary set_page_count in prep_compound_gigantic_page
Subsystems (2)
PATCH 1/1 hugetlb: remove unnecessary set_page_count in prep_compound_gigantic_page
In commit 7118fc2906e29 ("hugetlb: address ref count racing in prep_compound_gigantic_page"), page_ref_freeze is used to atomically zero the ref count of tail pages iff they are 1. The unconditional call to set_page_count(0) was left in the code. This call is after page_ref_freeze so it is really a noop.
Remove redundant and unnecessary set_page_count call.
--- mm/hugetlb.c | 1 - 1 file changed, 1 deletion(-)
mm/hugetlb.c +0 -1
@@ -1795,7 +1795,6 @@ static bool __prep_compound_gigantic_page(struct page *page, unsigned int order, }else {VM_BUG_ON_PAGE (page_count (p), p); } -set_page_count (p,0 );set_compound_head (p, page); }atomic_set (compound_mapcount_ptr (page),-1 );
Signature · 1 line
2.31.1
Quoted 7 lines · Mike Kravetz
In commit
7118fc2906e29("hugetlb: address ref count racing inprep_compound_gigantic_page"),page_ref_freezeis used to atomically zero the ref count of tail pages iff they are 1. The unconditional call toset_page_count(0)was left in the code. This call is afterpage_ref_freezeso it is really a noop.
Quoted 5 lines
Remove redundant and unnecessary
set_page_countcall.Fixes 7118fc2906e29 ("hugetlb: address ref count racing in prep_compound_gigantic_page")Suggested-by Pasha Tatashin <[email protected]>Signed-off-by Mike Kravetz <[email protected]>
Thanks,
Pasha
Quoted 11 lines · Mike Kravetz
In commit
7118fc2906e29("hugetlb: address ref count racing inprep_compound_gigantic_page"),page_ref_freezeis used to atomically zero the ref count of tail pages iff they are 1. The unconditional call toset_page_count(0)was left in the code. This call is afterpage_ref_freezeso it is really a noop.Remove redundant and unnecessary
set_page_countcall.Fixes 7118fc2906e29 ("hugetlb: address ref count racing in prep_compound_gigantic_page")Suggested-by Pasha Tatashin <[email protected]>Signed-off-by Mike Kravetz <[email protected]>
Quoted 11 lines · Mike Kravetz
In commit
7118fc2906e29("hugetlb: address ref count racing inprep_compound_gigantic_page"),page_ref_freezeis used to atomically zero the ref count of tail pages iff they are 1. The unconditional call toset_page_count(0)was left in the code. This call is afterpage_ref_freezeso it is really a noop.Remove redundant and unnecessary
set_page_countcall.Fixes 7118fc2906e29 ("hugetlb: address ref count racing in prep_compound_gigantic_page")Suggested-by Pasha Tatashin <[email protected]>Signed-off-by Mike Kravetz <[email protected]>
Quoted 20 lines
--- mm/hugetlb.c | 1 - 1 file changed, 1 deletion(-)mm/hugetlb.c +0
-1@@ -1795,7 +1795,6 @@ static bool __prep_compound_gigantic_page(struct page *page, unsigned int order, }else {VM_BUG_ON_PAGE (page_count (p), p); } -set_page_count (p,0 );set_compound_head (p, page); }atomic_set (compound_mapcount_ptr (page),-1 );Signature · 1 line
2.31.1
Signature · 2 lines
Oscar Salvador SUSE Labs
Quoted 7 lines · Mike Kravetz
In commit
7118fc2906e29("hugetlb: address ref count racing inprep_compound_gigantic_page"),page_ref_freezeis used to atomically zero the ref count of tail pages iff they are 1. The unconditional call toset_page_count(0)was left in the code. This call is afterpage_ref_freezeso it is really a noop.
Quoted 5 lines
Remove redundant and unnecessary
set_page_countcall.Fixes 7118fc2906e29 ("hugetlb: address ref count racing in prep_compound_gigantic_page")Suggested-by Pasha Tatashin <[email protected]>Signed-off-by Mike Kravetz <[email protected]>
Thanks.