]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.0.49/sparc64-be-less-verbose-during-vmemmap-population.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 3.0.49 / sparc64-be-less-verbose-during-vmemmap-population.patch
1 From d95bc56ac394a6cab136a87330680132a8068afd Mon Sep 17 00:00:00 2001
2 From: "David S. Miller" <davem@davemloft.net>
3 Date: Wed, 15 Aug 2012 00:37:29 -0700
4 Subject: sparc64: Be less verbose during vmemmap population.
5
6
7 From: "David S. Miller" <davem@davemloft.net>
8
9 [ Upstream commit 2856cc2e4d0852c3ddaae9dcb19cb9396512eb08 ]
10
11 On a 2-node machine with 256GB of ram we get 512 lines of
12 console output, which is just too much.
13
14 This mimicks Yinghai Lu's x86 commit c2b91e2eec9678dbda274e906cc32ea8f711da3b
15 (x86_64/mm: check and print vmemmap allocation continuous) except that
16 we aren't ever going to get contiguous block pointers in between calls
17 so just print when the virtual address or node changes.
18
19 This decreases the output by an order of 16.
20
21 Also demote this to KERN_DEBUG.
22
23 Signed-off-by: David S. Miller <davem@davemloft.net>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 ---
26 arch/sparc/mm/init_64.c | 28 +++++++++++++++++++++++-----
27 1 file changed, 23 insertions(+), 5 deletions(-)
28
29 --- a/arch/sparc/mm/init_64.c
30 +++ b/arch/sparc/mm/init_64.c
31 @@ -2118,6 +2118,9 @@ EXPORT_SYMBOL(_PAGE_CACHE);
32 #ifdef CONFIG_SPARSEMEM_VMEMMAP
33 unsigned long vmemmap_table[VMEMMAP_SIZE];
34
35 +static long __meminitdata addr_start, addr_end;
36 +static int __meminitdata node_start;
37 +
38 int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node)
39 {
40 unsigned long vstart = (unsigned long) start;
41 @@ -2148,15 +2151,30 @@ int __meminit vmemmap_populate(struct pa
42
43 *vmem_pp = pte_base | __pa(block);
44
45 - printk(KERN_INFO "[%p-%p] page_structs=%lu "
46 - "node=%d entry=%lu/%lu\n", start, block, nr,
47 - node,
48 - addr >> VMEMMAP_CHUNK_SHIFT,
49 - VMEMMAP_SIZE);
50 + /* check to see if we have contiguous blocks */
51 + if (addr_end != addr || node_start != node) {
52 + if (addr_start)
53 + printk(KERN_DEBUG " [%lx-%lx] on node %d\n",
54 + addr_start, addr_end-1, node_start);
55 + addr_start = addr;
56 + node_start = node;
57 + }
58 + addr_end = addr + VMEMMAP_CHUNK;
59 }
60 }
61 return 0;
62 }
63 +
64 +void __meminit vmemmap_populate_print_last(void)
65 +{
66 + if (addr_start) {
67 + printk(KERN_DEBUG " [%lx-%lx] on node %d\n",
68 + addr_start, addr_end-1, node_start);
69 + addr_start = 0;
70 + addr_end = 0;
71 + node_start = 0;
72 + }
73 +}
74 #endif /* CONFIG_SPARSEMEM_VMEMMAP */
75
76 static void prot_init_common(unsigned long page_none,