Update dcache, inode, pid, mountpoint, and mount hash tables to use HASH_ZERO, and remove initialization after allocations. In case of places where HASH_EARLY was used such as in __pv_init_lock_hash the zeroed hash table was already assumed, because memblock zeroes the memory. CPU: SPARC M6, Memory: 7T Before fix: Dentry cache hash table entries: 1073741824 Inode-cache hash table entries: 536870912 Mount-cache hash table entries: 16777216 Mountpoint-cache hash table entries: 16777216 ftrace: allocating 20414 entries in 40 pages Total time: 11.798s After fix: Dentry cache hash table entries: 1073741824 Inode-cache hash table entries: 536870912 Mount-cache hash table entries: 16777216 Mountpoint-cache hash table entries: 16777216 ftrace: allocating 20414 entries in 40 pages Total time: 3.198s CPU: Intel Xeon E5-2630, Memory: 2.2T: Before fix: Dentry cache hash table entries: 536870912 Inode-cache hash table entries: 268435456 Mount-cache hash table entries: 8388608 Mountpoint-cache hash table entries: 8388608 CPU: Physical Processor ID: 0 Total time: 3.245s After fix: Dentry cache hash table entries: 536870912 Inode-cache hash table entries: 268435456 Mount-cache hash table entries: 8388608 Mountpoint-cache hash table entries: 8388608 CPU: Physical Processor ID: 0 Total time: 3.244s
Showing the changes to kernel/locking (1 of 5 files). Show all
Unified · Split
| @@ -193,7 +193,8 @@ void __init __pv_init_lock_hash(void) · 192 unmodified lines | ||
| 193 | 193 | */ |
| 194 | 194 | pv_lock_hash = alloc_large_system_hash("PV qspinlock", |
| 195 | 195 | sizeof(struct pv_hash_entry), |
| 196 | − pv_hash_size, 0, HASH_EARLY, | |
| 196 | + pv_hash_size, 0, | |
| 197 | + HASH_EARLY | HASH_ZERO, | |
| 197 | 198 | &pv_lock_hash_bits, NULL, |
| 198 | 199 | pv_hash_size, pv_hash_size); |
| 199 | 200 | } |