History

mm: update callers to use HASH_ZERO flag

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

Pavel Tatashin committed 9 years ago

Commit 3d375d71 parent 3749a8f5 files · +12 −40Browse files

Showing the changes to kernel/locking (1 of 5 files). Show all

Unified · Split

kernel/locking/qspinlock_paravirt.h+2−1
@@ -193,7 +193,8 @@ void __init __pv_init_lock_hash(void) · 192 unmodified lines
193 */193 */
194 pv_lock_hash = alloc_large_system_hash("PV qspinlock",194 pv_lock_hash = alloc_large_system_hash("PV qspinlock",
195 sizeof(struct pv_hash_entry),195 sizeof(struct pv_hash_entry),
196 pv_hash_size, 0, HASH_EARLY,196 pv_hash_size, 0,
197 HASH_EARLY | HASH_ZERO,
197 &pv_lock_hash_bits, NULL,198 &pv_lock_hash_bits, NULL,
198 pv_hash_size, pv_hash_size);199 pv_hash_size, pv_hash_size);
199}200}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t