linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.14.y] mm/page_owner.c: remove drain_all_pages from init_early_allocated_pages
@ 2020-07-27 19:17 Nick Desaulniers
  2020-07-29 11:51 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Desaulniers @ 2020-07-27 19:17 UTC (permalink / raw)
  To: stable
  Cc: Oscar Salvador, Nick Desaulniers, Miles Chen, linux-mediatek,
	Matthias Brugger, Joonsoo Kim

From: Oscar Salvador <osalvador@techadventures.net>

commit u6bec6ad77fac3d29aed0d8e0b7526daedc964970 upstream.

When setting page_owner = on, the following warning can be seen in the
boot log:

  WARNING: CPU: 0 PID: 0 at mm/page_alloc.c:2537 drain_all_pages+0x171/0x1a0
  Modules linked in:
  CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.15.0-rc7-next-20180109-1-default+ #7
  Hardware name: Dell Inc. Latitude E7470/0T6HHJ, BIOS 1.11.3 11/09/2016
  RIP: 0010:drain_all_pages+0x171/0x1a0
  Call Trace:
    init_page_owner+0x4e/0x260
    start_kernel+0x3e6/0x4a6
    ? set_init_arg+0x55/0x55
    secondary_startup_64+0xa5/0xb0
  Code: c5 ed ff 89 df 48 c7 c6 20 3b 71 82 e8 f9 4b 52 00 3b 05 d7 0b f8 00 89 c3 72 d5 5b 5d 41 5

This warning is shown because we are calling drain_all_pages() in
init_early_allocated_pages(), but mm_percpu_wq is not up yet, it is being
set up later on in kernel_init_freeable() -> init_mm_internals().

Link: http://lkml.kernel.org/r/20180109153921.GA13070@techadventures.net
Signed-off-by: Oscar Salvador <osalvador@techadventures.net>
Acked-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Ayush Mittal <ayush.m@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
Fixes an easliy reproduced WARN_ON_ONCE observed with
CONFIG_PAGE_OWNER=y and page_owner=on boot param.  Looks like this
landed in v4.15-rc9 but hasn't been backported yet. Thanks to
Miles Chen <miles.chen@mediatek.com> for the report.

 mm/page_owner.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/page_owner.c b/mm/page_owner.c
index 6ac05a6ff2d1..4753b317ef7b 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -617,7 +617,6 @@ static void init_early_allocated_pages(void)
 {
 	pg_data_t *pgdat;
 
-	drain_all_pages(NULL);
 	for_each_online_pgdat(pgdat)
 		init_zones_in_node(pgdat);
 }
-- 
2.28.0.rc0.142.g3c755180ce-goog


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.14.y] mm/page_owner.c: remove drain_all_pages from init_early_allocated_pages
  2020-07-27 19:17 [PATCH 4.14.y] mm/page_owner.c: remove drain_all_pages from init_early_allocated_pages Nick Desaulniers
@ 2020-07-29 11:51 ` Greg KH
  2020-07-29 17:25   ` Nick Desaulniers
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2020-07-29 11:51 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Oscar Salvador, stable, Miles Chen, linux-mediatek,
	Matthias Brugger, Joonsoo Kim

On Mon, Jul 27, 2020 at 12:17:45PM -0700, Nick Desaulniers wrote:
> From: Oscar Salvador <osalvador@techadventures.net>
> 
> commit u6bec6ad77fac3d29aed0d8e0b7526daedc964970 upstream.

This is not a valid git id :(


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.14.y] mm/page_owner.c: remove drain_all_pages from init_early_allocated_pages
  2020-07-29 11:51 ` Greg KH
@ 2020-07-29 17:25   ` Nick Desaulniers
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2020-07-29 17:25 UTC (permalink / raw)
  To: Greg KH
  Cc: Oscar Salvador, # 3.4.x, Miles Chen, linux-mediatek,
	Matthias Brugger, Joonsoo Kim

On Wed, Jul 29, 2020 at 4:52 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Mon, Jul 27, 2020 at 12:17:45PM -0700, Nick Desaulniers wrote:
> > From: Oscar Salvador <osalvador@techadventures.net>
> >
> > commit u6bec6ad77fac3d29aed0d8e0b7526daedc964970 upstream.
>
> This is not a valid git id :(

Prepended a `u`. As a git user, I must have `u`ndid something.
Surprisingly it wasn't a `:wq` that was added.  Thanks for fixing that
up for me and applying.

-- 
Thanks,
~Nick Desaulniers

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-29 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 19:17 [PATCH 4.14.y] mm/page_owner.c: remove drain_all_pages from init_early_allocated_pages Nick Desaulniers
2020-07-29 11:51 ` Greg KH
2020-07-29 17:25   ` Nick Desaulniers

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).