lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQXR+3k4QmOJe59xom+JW5JZAP3znRXQwdyqV5LMEPCw2g@mail.gmail.com>
Date:	Fri, 22 Jun 2012 19:05:45 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	akpm@...ux-foundation.org
Cc:	torvalds@...ux-foundation.org, hannes@...xchg.org,
	davem@...emloft.net, shangw@...ux.vnet.ibm.com, tj@...nel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [patch 046/181] mm: remove sparsemem allocation details from the
 bootmem allocator

On Fri, Jun 22, 2012 at 6:11 PM, Yinghai Lu <yinghai@...nel.org> wrote:
> On Tue, May 29, 2012 at 3:06 PM,  <akpm@...ux-foundation.org> wrote:
>> From: Johannes Weiner <hannes@...xchg.org>
>> Subject: mm: remove sparsemem allocation details from the bootmem allocator
>>
>> alloc_bootmem_section() derives allocation area constraints from the
>> specified sparsemem section.  This is a bit specific for a generic memory
>> allocator like bootmem, though, so move it over to sparsemem.
>>
>> As __alloc_bootmem_node_nopanic() already retries failed allocations with
>> relaxed area constraints, the fallback code in sparsemem.c can be removed
>> and the code becomes a bit more compact overall.
>>
>> [akpm@...ux-foundation.org: fix build]
>> Signed-off-by: Johannes Weiner <hannes@...xchg.org>
>> Acked-by: Tejun Heo <tj@...nel.org>
>> Acked-by: David S. Miller <davem@...emloft.net>
>> Cc: Yinghai Lu <yinghai@...nel.org>
>> Cc: Gavin Shan <shangw@...ux.vnet.ibm.com>
>> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
>
> hi, this one cause regression, will put usemap to last node's memory
> instead of each node.
>
> got warning:
>
> [    0.000000] node 0 must be removed before remove section 16399
> [    0.000000] node 1 must be removed before remove section 16399
> [    0.000000] node 2 must be removed before remove section 16399
> [    0.000000] node 3 must be removed before remove section 16399
> [    0.000000] node 4 must be removed before remove section 16399
> [    0.000000] node 5 must be removed before remove section 16399
> [    0.000000] node 6 must be removed before remove section 16399
>
> location for usemap:
>
> [    0.000000] Initmem setup node 0 [mem 0x00000000-0x407fffffff]
> [    0.000000]   NODE_DATA [mem 0x407ffd9000-0x407fffffff]
> [    0.000000] Initmem setup node 1 [mem 0x4080000000-0x807fffffff]
> [    0.000000]   NODE_DATA [mem 0x807ffd9000-0x807fffffff]
> [    0.000000] Initmem setup node 2 [mem 0x8080000000-0xc07fffffff]
> [    0.000000]   NODE_DATA [mem 0xc07ffd9000-0xc07fffffff]
> [    0.000000] Initmem setup node 3 [mem 0xc080000000-0x1007fffffff]
> [    0.000000]   NODE_DATA [mem 0x1007ffd9000-0x1007fffffff]
> [    0.000000] Initmem setup node 4 [mem 0x10080000000-0x1407fffffff]
> [    0.000000]   NODE_DATA [mem 0x1407ffd9000-0x1407fffffff]
> [    0.000000] Initmem setup node 5 [mem 0x14080000000-0x1807fffffff]
> [    0.000000]   NODE_DATA [mem 0x1807ffd9000-0x1807fffffff]
> [    0.000000] Initmem setup node 6 [mem 0x18080000000-0x1c07fffffff]
> [    0.000000]   NODE_DATA [mem 0x1c07ffd9000-0x1c07fffffff]
> [    0.000000] Initmem setup node 7 [mem 0x1c080000000-0x2007fffffff]
> [    0.000000]   NODE_DATA [mem 0x2007fbd8000-0x2007fbfefff]
> [    0.000000] MEMBLOCK configuration:
> [    0.000000]  memory size = 0x1ffff6d5000 reserved size = 0x105a544ee
> [    0.000000]  memory.cnt  = 0xa
> [    0.000000]  memory[0x0]     [0x00010000-0x00094fff], 0x85000 bytes on node 0
> [    0.000000]  memory[0x1]     [0x00100000-0x7f74ffff], 0x7f650000
> bytes on node 0
> [    0.000000]  memory[0x2]     [0x100000000-0x407fffffff],
> 0x3f80000000 bytes on node 0
> [    0.000000]  memory[0x3]     [0x4080000000-0x807fffffff],
> 0x4000000000 bytes on node 1
> [    0.000000]  memory[0x4]     [0x8080000000-0xc07fffffff],
> 0x4000000000 bytes on node 2
> [    0.000000]  memory[0x5]     [0xc080000000-0x1007fffffff],
> 0x4000000000 bytes on node 3
> [    0.000000]  memory[0x6]     [0x10080000000-0x1407fffffff],
> 0x4000000000 bytes on node 4
> [    0.000000]  memory[0x7]     [0x14080000000-0x1807fffffff],
> 0x4000000000 bytes on node 5
> [    0.000000]  memory[0x8]     [0x18080000000-0x1c07fffffff],
> 0x4000000000 bytes on node 6
> [    0.000000]  memory[0x9]     [0x1c080000000-0x2007fffffff],
> 0x4000000000 bytes on node 7
> [    0.000000]  reserved.cnt  = 0x10
> [    0.000000]  reserved[0x0]   [0x0008f000-0x00094fff], 0x6000 bytes
> [    0.000000]  reserved[0x1]   [0x00095400-0x000fffff], 0x6ac00 bytes
> [    0.000000]  reserved[0x2]   [0x01000000-0x02afb9db], 0x1afb9dc bytes
> [    0.000000]  reserved[0x3]   [0x02cfb9dc-0x0383f8ad], 0xb43ed2 bytes
> [    0.000000]  reserved[0x4]   [0x7ccd9000-0x7d0d5fff], 0x3fd000 bytes
> [    0.000000]  reserved[0x5]   [0x7d0d8000-0x7f744fff], 0x266d000 bytes
> [    0.000000]  reserved[0x6]   [0x407ffd9000-0x407fffffff], 0x27000 bytes
> [    0.000000]  reserved[0x7]   [0x807ffd9000-0x807fffffff], 0x27000 bytes
> [    0.000000]  reserved[0x8]   [0xc07ffd9000-0xc07fffffff], 0x27000 bytes
> [    0.000000]  reserved[0x9]   [0x1007ffd9000-0x1007fffffff], 0x27000 bytes
> [    0.000000]  reserved[0xa]   [0x1407ffd9000-0x1407fffffff], 0x27000 bytes
> [    0.000000]  reserved[0xb]   [0x1807ffd9000-0x1807fffffff], 0x27000 bytes
> [    0.000000]  reserved[0xc]   [0x1c07ffd9000-0x1c07fffffff], 0x27000 bytes
> [    0.000000]  reserved[0xd]   [0x1ff7f3f9000-0x2007f7fafff], 0x100402000 bytes
> [    0.000000]  reserved[0xe]   [0x2007fbd8000-0x2007fbff03f], 0x27040 bytes
> [    0.000000]  reserved[0xf]   [0x2007fc00000-0x2007fffffff], 0x400000 bytes
> [    0.000000] memblock_reserve: [0x1ff7eff9000-0x1ff7f3f8fff] usemap_map
> [    0.000000] memblock_reserve: [0x2007fbc4000-0x2007fbcffff] usemap section
> [    0.000000] node 0 must be removed before remove section 16399
> [    0.000000] memblock_reserve: [0x2007fbb8000-0x2007fbc3fff] usemap section
> [    0.000000] node 1 must be removed before remove section 16399
> [    0.000000] memblock_reserve: [0x2007fbac000-0x2007fbb7fff] usemap section
> [    0.000000] node 2 must be removed before remove section 16399
> [    0.000000] memblock_reserve: [0x2007fba0000-0x2007fbabfff] usemap section
> [    0.000000] node 3 must be removed before remove section 16399
> [    0.000000] memblock_reserve: [0x2007fb94000-0x2007fb9ffff] usemap section
> [    0.000000] node 4 must be removed before remove section 16399
> [    0.000000] memblock_reserve: [0x2007fb88000-0x2007fb93fff] usemap section
> [    0.000000] node 5 must be removed before remove section 16399
> [    0.000000] memblock_reserve: [0x2007fb7c000-0x2007fb87fff] usemap section
> [    0.000000] node 6 must be removed before remove section 16399
> [    0.000000] memblock_reserve: [0x2007fb70000-0x2007fb7bfff] usemap section
>
> reverting that patch fixes the problem.
>
> will get correct...
>
> [    0.000000] memblock_reserve: [0x1ff7eff9000-0x1ff7f3f8fff] usemap_map
> [    0.000000] memblock_reserve: [0x407ffc4000-0x407ffcffff] usermap section
> [    0.000000] memblock_reserve: [0x807ffc5000-0x807ffd0fff] usermap section
> [    0.000000] memblock_reserve: [0xc07ffc5000-0xc07ffd0fff] usermap section
> [    0.000000] memblock_reserve: [0x1007ffc5000-0x1007ffd0fff] usermap section
> [    0.000000] memblock_reserve: [0x1407ffc5000-0x1407ffd0fff] usermap section
> [    0.000000] memblock_reserve: [0x1807ffc5000-0x1807ffd0fff] usermap section
> [    0.000000] memblock_reserve: [0x1c07ffc5000-0x1c07ffd0fff] usermap section
> [    0.000000] memblock_reserve: [0x2007fbc4000-0x2007fbcffff] usermap section
>

attached patch fixes the problem.

you can decide if reverting the commit or apply the patch.

Thanks

Yinghai

Download attachment "fix_usemap_goal.patch" of type "application/octet-stream" (713 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ