[PATCH] mm: remove offset check on page->compound_head and folio->lru

Wei Yang posted 1 patch 4 years, 5 months ago
include/linux/mm_types.h | 1 -
1 file changed, 1 deletion(-)
[PATCH] mm: remove offset check on page->compound_head and folio->lru
Posted by Wei Yang 4 years, 5 months ago
FOLIO_MATCH() is used to make sure struct page and folio has identical
layout for the first several words.

The comparison of offset between page->compound_head and folio->lru is
more like an internal check in struct page.

This patch just removes it.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 include/linux/mm_types.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 0a2de709fe40..087d6768bc78 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -289,7 +289,6 @@ static_assert(sizeof(struct page) == sizeof(struct folio));
 FOLIO_MATCH(flags, flags);
 FOLIO_MATCH(lru, lru);
 FOLIO_MATCH(mapping, mapping);
-FOLIO_MATCH(compound_head, lru);
 FOLIO_MATCH(index, index);
 FOLIO_MATCH(private, private);
 FOLIO_MATCH(_mapcount, _mapcount);
-- 
2.33.1

Re: [PATCH] mm: remove offset check on page->compound_head and folio->lru
Posted by Matthew Wilcox 4 years, 5 months ago
On Thu, Jan 06, 2022 at 11:52:54PM +0000, Wei Yang wrote:
> FOLIO_MATCH() is used to make sure struct page and folio has identical
> layout for the first several words.
> 
> The comparison of offset between page->compound_head and folio->lru is
> more like an internal check in struct page.
> 
> This patch just removes it.
> 
> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>

No.
Re: [PATCH] mm: remove offset check on page->compound_head and folio->lru
Posted by Wei Yang 4 years, 5 months ago
On Fri, Jan 07, 2022 at 03:59:01AM +0000, Matthew Wilcox wrote:
>On Thu, Jan 06, 2022 at 11:52:54PM +0000, Wei Yang wrote:
>> FOLIO_MATCH() is used to make sure struct page and folio has identical
>> layout for the first several words.
>> 
>> The comparison of offset between page->compound_head and folio->lru is
>> more like an internal check in struct page.
>> 
>> This patch just removes it.
>> 
>> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>
>No.

Hi, Matthew

Would you mind sharing some insight on this check?

-- 
Wei Yang
Help you, Help me