2021-08-30 14:12:55

by Miaohe Lin

[permalink] [raw]
Subject: [PATCH 3/6] mm/page_alloc.c: remove obsolete comment in free_pcppages_bulk()

It's also confusing now. Remove it.

Signed-off-by: Miaohe Lin <[email protected]>
---
mm/page_alloc.c | 11 -----------
1 file changed, 11 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d3983244f56f..b5edcfe112aa 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1424,17 +1424,6 @@ static inline void prefetch_buddy(struct page *page)
prefetch(buddy);
}

-/*
- * Frees a number of pages from the PCP lists
- * Assumes all pages on list are in same zone, and of same order.
- * count is the number of pages to free.
- *
- * If the zone was previously in an "all pages pinned" state then look to
- * see if this freeing clears that state.
- *
- * And clear the zone's pages_scanned counter, to hold off the "all pages are
- * pinned" detection logic.
- */
static void free_pcppages_bulk(struct zone *zone, int count,
struct per_cpu_pages *pcp)
{
--
2.23.0


2021-08-31 13:42:21

by Mel Gorman

[permalink] [raw]
Subject: Re: [PATCH 3/6] mm/page_alloc.c: remove obsolete comment in free_pcppages_bulk()

On Mon, Aug 30, 2021 at 10:10:48PM +0800, Miaohe Lin wrote:
> It's also confusing now. Remove it.
>

Why is the whole comment obsolete?

The second two paragraphs about "all pages pinned" and pages_scanned is
obsolete and can go but the first paragraph is valid.

--
Mel Gorman
SUSE Labs

2021-09-01 07:55:39

by Miaohe Lin

[permalink] [raw]
Subject: Re: [PATCH 3/6] mm/page_alloc.c: remove obsolete comment in free_pcppages_bulk()

On 2021/8/31 21:38, Mel Gorman wrote:
> On Mon, Aug 30, 2021 at 10:10:48PM +0800, Miaohe Lin wrote:
>> It's also confusing now. Remove it.
>>
>
> Why is the whole comment obsolete?
>
> The second two paragraphs about "all pages pinned" and pages_scanned is
> obsolete and can go but the first paragraph is valid.
>

I think the first paragraph is invalid due to the below statement:
"Assumes all pages on list are in same zone, and of same order."
There are NR_PCP_LISTS lists and PAGE_ALLOC_COSTLY_ORDER + 1 + NR_PCP_THP
orders in pcp. So I think it's obsolete.

Should I delete this statement in the first paragraph only?

Many Thanks.

2021-09-01 22:19:50

by Mel Gorman

[permalink] [raw]
Subject: Re: [PATCH 3/6] mm/page_alloc.c: remove obsolete comment in free_pcppages_bulk()

On Wed, Sep 01, 2021 at 03:49:03PM +0800, Miaohe Lin wrote:
> On 2021/8/31 21:38, Mel Gorman wrote:
> > On Mon, Aug 30, 2021 at 10:10:48PM +0800, Miaohe Lin wrote:
> >> It's also confusing now. Remove it.
> >>
> >
> > Why is the whole comment obsolete?
> >
> > The second two paragraphs about "all pages pinned" and pages_scanned is
> > obsolete and can go but the first paragraph is valid.
> >
>
> I think the first paragraph is invalid due to the below statement:
> "Assumes all pages on list are in same zone, and of same order."
> There are NR_PCP_LISTS lists and PAGE_ALLOC_COSTLY_ORDER + 1 + NR_PCP_THP
> orders in pcp. So I think it's obsolete.
>

Ah.

> Should I delete this statement in the first paragraph only?
>

Remove ", and of same order"

--
Mel Gorman
SUSE Labs

2021-09-02 06:30:24

by Miaohe Lin

[permalink] [raw]
Subject: Re: [PATCH 3/6] mm/page_alloc.c: remove obsolete comment in free_pcppages_bulk()

On 2021/9/1 23:14, Mel Gorman wrote:
> On Wed, Sep 01, 2021 at 03:49:03PM +0800, Miaohe Lin wrote:
>> On 2021/8/31 21:38, Mel Gorman wrote:
>>> On Mon, Aug 30, 2021 at 10:10:48PM +0800, Miaohe Lin wrote:
>>>> It's also confusing now. Remove it.
>>>>
>>>
>>> Why is the whole comment obsolete?
>>>
>>> The second two paragraphs about "all pages pinned" and pages_scanned is
>>> obsolete and can go but the first paragraph is valid.
>>>
>>
>> I think the first paragraph is invalid due to the below statement:
>> "Assumes all pages on list are in same zone, and of same order."
>> There are NR_PCP_LISTS lists and PAGE_ALLOC_COSTLY_ORDER + 1 + NR_PCP_THP
>> orders in pcp. So I think it's obsolete.
>>
>
> Ah.
>
>> Should I delete this statement in the first paragraph only?
>>
>
> Remove ", and of same order"

Will do this in v2. Thanks.

>