In uma_startup_count() handle special case when zone will fit into
single slab, but with alignment adjustment it won't. Again, when there is only one item in a slab alignment can be ignored. See previous revision of this file for more info. PR: 227116
This commit is contained in:
parent
b8ac450ecc
commit
f1818db2fc
@ -1828,9 +1828,11 @@ uma_startup_count(int vm_zones)
|
||||
#endif
|
||||
|
||||
/* Memory for the rest of startup zones, UMA and VM, ... */
|
||||
if (zsize > UMA_SLAB_SIZE)
|
||||
if (zsize > UMA_SLAB_SPACE)
|
||||
pages += (zones + vm_zones) *
|
||||
howmany(roundup2(zsize, UMA_BOOT_ALIGN), UMA_SLAB_SIZE);
|
||||
else if (roundup2(zsize, UMA_BOOT_ALIGN) > UMA_SLAB_SPACE)
|
||||
pages += zones;
|
||||
else
|
||||
pages += howmany(zones,
|
||||
UMA_SLAB_SPACE / roundup2(zsize, UMA_BOOT_ALIGN));
|
||||
|
Loading…
Reference in New Issue
Block a user