diff mbox series

mm: remove reset of pcp->counter in pageset_init()

Message ID 20181021023920.5501-1-richard.weiyang@gmail.com (mailing list archive)
State New, archived
Headers show
Series mm: remove reset of pcp->counter in pageset_init() | expand

Commit Message

Wei Yang Oct. 21, 2018, 2:39 a.m. UTC
per_cpu_pageset is cleared by memset, it is not necessary to reset it
again.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 mm/page_alloc.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Wei Yang Nov. 7, 2018, 12:34 a.m. UTC | #1
Andrew,

Do you like this tiny one :-)

On Sun, Oct 21, 2018 at 10:39:20AM +0800, Wei Yang wrote:
>per_cpu_pageset is cleared by memset, it is not necessary to reset it
>again.
>
>Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>---
> mm/page_alloc.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>index 15ea511fb41c..730fadd9b639 100644
>--- a/mm/page_alloc.c
>+++ b/mm/page_alloc.c
>@@ -5647,7 +5647,6 @@ static void pageset_init(struct per_cpu_pageset *p)
> 	memset(p, 0, sizeof(*p));
> 
> 	pcp = &p->pcp;
>-	pcp->count = 0;
> 	for (migratetype = 0; migratetype < MIGRATE_PCPTYPES; migratetype++)
> 		INIT_LIST_HEAD(&pcp->lists[migratetype]);
> }
>-- 
>2.15.1
diff mbox series

Patch

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 15ea511fb41c..730fadd9b639 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5647,7 +5647,6 @@  static void pageset_init(struct per_cpu_pageset *p)
 	memset(p, 0, sizeof(*p));
 
 	pcp = &p->pcp;
-	pcp->count = 0;
 	for (migratetype = 0; migratetype < MIGRATE_PCPTYPES; migratetype++)
 		INIT_LIST_HEAD(&pcp->lists[migratetype]);
 }