* [PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c
@ 2011-11-15 8:06 Wang Sheng-Hui
2011-11-15 13:24 ` Michal Hocko
0 siblings, 1 reply; 5+ messages in thread
From: Wang Sheng-Hui @ 2011-11-15 8:06 UTC (permalink / raw)
To: linux-mm, linux-kernel
Per the void prep_compound_page(struct page *page, unsigned long order) code,
compound pages use PG_head/PG_tail, and only tail pages point at head page
using their ->first_page field.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
mm/page_alloc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6e8ecb6..f645ce8 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -332,8 +332,8 @@ out:
*
* The remaining PAGE_SIZE pages are called "tail pages".
*
- * All pages have PG_compound set. All pages have their ->private pointing at
- * the head page (even the head page has this).
+ * Head page has PG_head set, and all tail pages have PG_tail set. All tail
+ * pages have their ->first_page pointing at the head page.
*
* The first tail page's ->lru.next holds the address of the compound page's
* put_page() function. Its ->lru.prev holds the order of allocation.
--
1.7.1
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c
2011-11-15 8:06 [PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c Wang Sheng-Hui
@ 2011-11-15 13:24 ` Michal Hocko
2011-11-16 0:05 ` Wang Sheng-Hui
0 siblings, 1 reply; 5+ messages in thread
From: Michal Hocko @ 2011-11-15 13:24 UTC (permalink / raw)
To: Wang Sheng-Hui; +Cc: linux-mm, linux-kernel
On Tue 15-11-11 16:06:16, Wang Sheng-Hui wrote:
> Per the void prep_compound_page(struct page *page, unsigned long order) code,
> compound pages use PG_head/PG_tail,
This is true only for CONFIG_PAGEFLAGS_EXTENDED otherwise we trick it by
PG_compound & ~PG_reclaim = head page
PG_compound & PG_reclaim = tail page
Have a look at PG_head_tail_mask
> and only tail pages point at head page using their ->first_page field.
This part is correct.
>
> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
> ---
> mm/page_alloc.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 6e8ecb6..f645ce8 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -332,8 +332,8 @@ out:
> *
> * The remaining PAGE_SIZE pages are called "tail pages".
> *
> - * All pages have PG_compound set. All pages have their ->private pointing at
> - * the head page (even the head page has this).
> + * Head page has PG_head set, and all tail pages have PG_tail set. All tail
> + * pages have their ->first_page pointing at the head page.
> *
> * The first tail page's ->lru.next holds the address of the compound page's
> * put_page() function. Its ->lru.prev holds the order of allocation.
> --
> 1.7.1
>
> --
> 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/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c
2011-11-15 13:24 ` Michal Hocko
@ 2011-11-16 0:05 ` Wang Sheng-Hui
2011-11-17 8:22 ` Michal Hocko
0 siblings, 1 reply; 5+ messages in thread
From: Wang Sheng-Hui @ 2011-11-16 0:05 UTC (permalink / raw)
To: Michal Hocko; +Cc: linux-mm, linux-kernel
On 2011a1'11ae??15ae?JPY 21:24, Michal Hocko wrote:
> On Tue 15-11-11 16:06:16, Wang Sheng-Hui wrote:
>> Per the void prep_compound_page(struct page *page, unsigned long order) code,
>> compound pages use PG_head/PG_tail,
>
> This is true only for CONFIG_PAGEFLAGS_EXTENDED otherwise we trick it by
> PG_compound & ~PG_reclaim = head page
> PG_compound & PG_reclaim = tail page
>
> Have a look at PG_head_tail_mask
>
>> and only tail pages point at head page using their ->first_page field.
>
> This part is correct.
>
>>
>> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
>> ---
>> mm/page_alloc.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index 6e8ecb6..f645ce8 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -332,8 +332,8 @@ out:
>> *
>> * The remaining PAGE_SIZE pages are called "tail pages".
>> *
>> - * All pages have PG_compound set. All pages have their ->private pointing at
>> - * the head page (even the head page has this).
>> + * Head page has PG_head set, and all tail pages have PG_tail set. All tail
>> + * pages have their ->first_page pointing at the head page.
>> *
>> * The first tail page's ->lru.next holds the address of the compound page's
>> * put_page() function. Its ->lru.prev holds the order of allocation.
>> --
>> 1.7.1
>>
>> --
>> 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/ .
>> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
>> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>
Thanks, Michal.
New patch generated.
[PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c
Only tail pages point at the head page using their ->first_page fields.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
mm/page_alloc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6e8ecb6..e7dd848 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -332,8 +332,8 @@ out:
*
* The remaining PAGE_SIZE pages are called "tail pages".
*
- * All pages have PG_compound set. All pages have their ->private pointing at
- * the head page (even the head page has this).
+ * All pages have PG_compound set. All tail pages have their ->first_page
+ * pointing at the head page.
*
* The first tail page's ->lru.next holds the address of the compound page's
* put_page() function. Its ->lru.prev holds the order of allocation.
--
1.7.1
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c
2011-11-16 0:05 ` Wang Sheng-Hui
@ 2011-11-17 8:22 ` Michal Hocko
2011-11-17 9:54 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Michal Hocko @ 2011-11-17 8:22 UTC (permalink / raw)
To: Wang Sheng-Hui; +Cc: linux-mm, linux-kernel, trivial
[CCing trivial tree]
Unquoted patch at https://lkml.org/lkml/2011/11/15/402
On Wed 16-11-11 08:05:07, Wang Sheng-Hui wrote:
[...]
> Thanks, Michal.
>
> New patch generated.
>
>
> [PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c
>
> Only tail pages point at the head page using their ->first_page fields.
>
> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
> ---
> mm/page_alloc.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 6e8ecb6..e7dd848 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -332,8 +332,8 @@ out:
> *
> * The remaining PAGE_SIZE pages are called "tail pages".
> *
> - * All pages have PG_compound set. All pages have their ->private pointing at
> - * the head page (even the head page has this).
> + * All pages have PG_compound set. All tail pages have their ->first_page
> + * pointing at the head page.
> *
> * The first tail page's ->lru.next holds the address of the compound page's
> * put_page() function. Its ->lru.prev holds the order of allocation.
> --
> 1.7.1
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c
2011-11-17 8:22 ` Michal Hocko
@ 2011-11-17 9:54 ` Jiri Kosina
0 siblings, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2011-11-17 9:54 UTC (permalink / raw)
To: Michal Hocko; +Cc: Wang Sheng-Hui, linux-mm, linux-kernel
On Thu, 17 Nov 2011, Michal Hocko wrote:
> [CCing trivial tree]
>
> Unquoted patch at https://lkml.org/lkml/2011/11/15/402
>
> On Wed 16-11-11 08:05:07, Wang Sheng-Hui wrote:
> [...]
> > Thanks, Michal.
> >
> > New patch generated.
> >
> >
> > [PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c
> >
> > Only tail pages point at the head page using their ->first_page fields.
> >
> > Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
>
> Reviewed-by: Michal Hocko <mhocko@suse.cz>
Applied, thanks.
--
Jiri Kosina
SUSE Labs
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-17 9:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15 8:06 [PATCH] mm: cleanup the comment for head/tail pages of compound pages in mm/page_alloc.c Wang Sheng-Hui
2011-11-15 13:24 ` Michal Hocko
2011-11-16 0:05 ` Wang Sheng-Hui
2011-11-17 8:22 ` Michal Hocko
2011-11-17 9:54 ` Jiri Kosina
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).