TO: Daniel Sanders <[email protected]>
CC: Behan Webster <[email protected]>
tree: git://git.linuxfoundation.org/llvmlinux/kernel master
head: 230b22d72454f0b9ed2cf1410771bbba7830f89e
commit: 9cc263b359475735f58d0ad21571cdbf021336c9 [22/42] Correct size_index
table before replacing the bootstrap kmem_cache_node
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago
mm/slab_common.c:694 correct_kmalloc_cache_index_table() warn: we never enter
this loop
git remote add llvmlinux git://git.linuxfoundation.org/llvmlinux/kernel
git remote update llvmlinux
git checkout 9cc263b359475735f58d0ad21571cdbf021336c9
vim +694 mm/slab_common.c
2c59dd65 Christoph Lameter 2013-01-10 678 * Patch up the size_index table if
we have strange large alignment
2c59dd65 Christoph Lameter 2013-01-10 679 * requirements for the kmalloc
array. This is only the case for
2c59dd65 Christoph Lameter 2013-01-10 680 * MIPS it seems. The standard
arches will not generate any code here.
2c59dd65 Christoph Lameter 2013-01-10 681 *
2c59dd65 Christoph Lameter 2013-01-10 682 * Largest permitted alignment is
256 bytes due to the way we
2c59dd65 Christoph Lameter 2013-01-10 683 * handle the index determination
for the smaller caches.
2c59dd65 Christoph Lameter 2013-01-10 684 *
2c59dd65 Christoph Lameter 2013-01-10 685 * Make sure that nothing crazy
happens if someone starts tinkering
2c59dd65 Christoph Lameter 2013-01-10 686 * around with ARCH_KMALLOC_MINALIGN
2c59dd65 Christoph Lameter 2013-01-10 687 */
9cc263b3 Daniel Sanders 2015-01-08 688 void __init
correct_kmalloc_cache_index_table(void) {
9cc263b3 Daniel Sanders 2015-01-08 689 int i;
9cc263b3 Daniel Sanders 2015-01-08 690
2c59dd65 Christoph Lameter 2013-01-10 691 BUILD_BUG_ON(KMALLOC_MIN_SIZE >
256 ||
2c59dd65 Christoph Lameter 2013-01-10 692 (KMALLOC_MIN_SIZE &
(KMALLOC_MIN_SIZE - 1)));
2c59dd65 Christoph Lameter 2013-01-10 693
2c59dd65 Christoph Lameter 2013-01-10 @694 for (i = 8; i <
KMALLOC_MIN_SIZE; i += 8) {
2c59dd65 Christoph Lameter 2013-01-10 695 int elem =
size_index_elem(i);
2c59dd65 Christoph Lameter 2013-01-10 696
2c59dd65 Christoph Lameter 2013-01-10 697 if (elem >=
ARRAY_SIZE(size_index))
2c59dd65 Christoph Lameter 2013-01-10 698 break;
2c59dd65 Christoph Lameter 2013-01-10 699 size_index[elem] =
KMALLOC_SHIFT_LOW;
2c59dd65 Christoph Lameter 2013-01-10 700 }
2c59dd65 Christoph Lameter 2013-01-10 701
2c59dd65 Christoph Lameter 2013-01-10 702 if (KMALLOC_MIN_SIZE >= 64) {
:::::: The code at line 694 was first introduced by commit
:::::: 2c59dd6544212faa5ce761920d2251f4152f408d slab: Common Kmalloc cache
determination
:::::: TO: Christoph Lameter <[email protected]>
:::::: CC: Pekka Enberg <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
_______________________________________________
kbuild mailing list
[email protected]
https://lists.01.org/mailman/listinfo/kbuild