summaryrefslogtreecommitdiffstats
path: root/block/bsg-lib.c
diff options
context:
space:
mode:
authorYunfeng Ye <yeyunfeng@huawei.com>2019-11-30 17:56:27 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-12-01 12:59:08 -0800
commit0ac398b171aacd0f0c132d989ec4efb5de94f34a (patch)
treef5c500393edb2308a7cf8e5bff3b63ccb79d290b /block/bsg-lib.c
parent95830666be2aef81a2963135822ab92f4902a06b (diff)
downloadlinux-0ac398b171aacd0f0c132d989ec4efb5de94f34a.tar.bz2
mm: support memblock alloc on the exact node for sparse_buffer_init()
sparse_buffer_init() use memblock_alloc_try_nid_raw() to allocate memory for page management structure, if memory allocation fails from specified node, it will fall back to allocate from other nodes. Normally, the page management structure will not exceed 2% of the total memory, but a large continuous block of allocation is needed. In most cases, memory allocation from the specified node will succeed, but a node memory become highly fragmented will fail. we expect to allocate memory base section rather than by allocating a large block of memory from other NUMA nodes Add memblock_alloc_exact_nid_raw() for this situation, which allocate boot memory block on the exact node. If a large contiguous block memory allocate fail in sparse_buffer_init(), it will fall back to allocate small block memory base section. Link: http://lkml.kernel.org/r/66755ea7-ab10-8882-36fd-3e02b03775d5@huawei.com Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Cc: Wei Yang <richardw.yang@linux.intel.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Dan Williams <dan.j.williams@intel.com> Cc: David Hildenbrand <david@redhat.com> Cc: Qian Cai <cai@lca.pw> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block/bsg-lib.c')
0 files changed, 0 insertions, 0 deletions