Use correct arithmetic to calculate how many pages we need for kegs
and hashes. There is no functional change with current sizes.
This commit is contained in:
parent
e2068d0bcd
commit
d2be4a1e4f
@ -1810,14 +1810,14 @@ uma_startup_count(int zones)
|
||||
pages += howmany(zones, UMA_SLAB_SIZE / zsize);
|
||||
|
||||
/* ... and their kegs. */
|
||||
pages += howmany(ksize * zones, UMA_SLAB_SIZE);
|
||||
pages += howmany(zones, UMA_SLAB_SIZE / ksize);
|
||||
|
||||
/*
|
||||
* Take conservative approach that every zone
|
||||
* is going to allocate hash.
|
||||
*/
|
||||
pages += howmany(sizeof(struct slabhead *) * UMA_HASH_SIZE_INIT *
|
||||
zones, UMA_SLAB_SIZE);
|
||||
pages += howmany(zones, UMA_SLAB_SIZE /
|
||||
(sizeof(struct slabhead *) * UMA_HASH_SIZE_INIT));
|
||||
|
||||
return (pages);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user