linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* The patch "mm, page_alloc: avoid looking up the first zone in a zonelist twice" breaks memory management
@ 2016-05-31 21:20 Mikulas Patocka
  2016-05-31 21:47 ` Vlastimil Babka
  0 siblings, 1 reply; 3+ messages in thread
From: Mikulas Patocka @ 2016-05-31 21:20 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Vlastimil Babka, Jesper Dangaard Brouer, Andrew Morton, linux-mm,
	linux-kernel, linux-parisc, Helge Deller

Hi

The patch c33d6c06f60f710f0305ae792773e1c2560e1e51 ("mm, page_alloc: avoid 
looking up the first zone in a zonelist twice") breaks memory management 
on PA-RISC.

The PA-RISC system is not NUMA, but the chipset maps physical memory to 
three distinct ranges, so the kernel sets up three nodes. My machine has 
7GiB RAM and the memory is mapped to these ranges:

 Memory Ranges:
  0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
  1) Start 0x0000000100000000 End 0x00000001bfdfffff Size   3070 MB
  2) Start 0x0000004040000000 End 0x00000040ffffffff Size   3072 MB
 Total Memory: 7166 MB
 On node 0 totalpages: 262144
 free_area_init_node: node 0, pgdat 405e44d0, node_mem_map 415ed000
   Normal zone: 3584 pages used for memmap
   Normal zone: 0 pages reserved
   Normal zone: 262144 pages, LIFO batch:31
 On node 1 totalpages: 785920
 free_area_init_node: node 1, pgdat 405e5140, node_mem_map 140000000
   Normal zone: 10745 pages used for memmap
   Normal zone: 0 pages reserved
   Normal zone: 785920 pages, LIFO batch:31
 On node 2 totalpages: 786432
 free_area_init_node: node 2, pgdat 405e5db0, node_mem_map 4080000000
   Normal zone: 10752 pages used for memmap
   Normal zone: 0 pages reserved
   Normal zone: 786432 pages, LIFO batch:31

Prior to the patch c33d6c06f60f710f0305ae792773e1c2560e1e51, the kernel 
could use all 7GiB of RAM as file cache. After this patch, the kernel 
fills the first 1GiB zone with cache and then starts reclaiming the cache 
(or sometimes even swapping) instead of using the remaining two zones as a 
file cache.

The bug can be reproduced by reading 2GiB file and noticing that the 
amount of cached memory stays near 1GiB.

Mikulas

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: The patch "mm, page_alloc: avoid looking up the first zone in a zonelist twice" breaks memory management
  2016-05-31 21:20 The patch "mm, page_alloc: avoid looking up the first zone in a zonelist twice" breaks memory management Mikulas Patocka
@ 2016-05-31 21:47 ` Vlastimil Babka
  2016-06-01 12:26   ` Mikulas Patocka
  0 siblings, 1 reply; 3+ messages in thread
From: Vlastimil Babka @ 2016-05-31 21:47 UTC (permalink / raw)
  To: Mikulas Patocka, Mel Gorman
  Cc: Jesper Dangaard Brouer, Andrew Morton, linux-mm, linux-kernel,
	linux-parisc, Helge Deller

On 05/31/2016 11:20 PM, Mikulas Patocka wrote:
> Hi
> 
> The patch c33d6c06f60f710f0305ae792773e1c2560e1e51 ("mm, page_alloc: avoid 
> looking up the first zone in a zonelist twice") breaks memory management 
> on PA-RISC.

Hi,

I think the linked patch should help. Please try and report.

http://marc.info/?i=20160531100848.GR2527%40techsingularity.net

Thanks,
Vlastimil

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

* Re: The patch "mm, page_alloc: avoid looking up the first zone in a zonelist twice" breaks memory management
  2016-05-31 21:47 ` Vlastimil Babka
@ 2016-06-01 12:26   ` Mikulas Patocka
  0 siblings, 0 replies; 3+ messages in thread
From: Mikulas Patocka @ 2016-06-01 12:26 UTC (permalink / raw)
  To: Vlastimil Babka
  Cc: Mel Gorman, Jesper Dangaard Brouer, Andrew Morton, linux-mm,
	linux-kernel, linux-parisc, Helge Deller



On Tue, 31 May 2016, Vlastimil Babka wrote:

> On 05/31/2016 11:20 PM, Mikulas Patocka wrote:
> > Hi
> > 
> > The patch c33d6c06f60f710f0305ae792773e1c2560e1e51 ("mm, page_alloc: avoid 
> > looking up the first zone in a zonelist twice") breaks memory management 
> > on PA-RISC.
> 
> Hi,
> 
> I think the linked patch should help. Please try and report.
> 
> http://marc.info/?i=20160531100848.GR2527%40techsingularity.net
> 
> Thanks,
> Vlastimil

Thanks, that patch fixes it.

Mikulas

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2016-06-01 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31 21:20 The patch "mm, page_alloc: avoid looking up the first zone in a zonelist twice" breaks memory management Mikulas Patocka
2016-05-31 21:47 ` Vlastimil Babka
2016-06-01 12:26   ` Mikulas Patocka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox