Project

General

Profile

Actions

Bug #15038

open

NPC_MUTEX sizing should be revisted

Added by Patrick Mooney 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Running lockstat while a nightly build runs on a moderately sized (16C/32T) shows significant contention on some vm-related locks:

Adaptive mutex spin: 3790337 events in 20.393 seconds (185866 events/sec)

Count indv cuml rcnt     nsec Lock                   Caller
-------------------------------------------------------------------------------
269066   7%   7% 0.00     1447 0xfffffe0079c445b8     page_ctr_add+0x63
264926   7%  14% 0.00     1429 0xfffffe0079c445b0     page_ctr_add+0x63
242291   6%  20% 0.00     1524 0xfffffe0079c445b8     page_ctr_sub+0x63
237983   6%  27% 0.00     1512 0xfffffe0079c445b0     page_ctr_sub+0x63
151645   4%  31% 0.00     1129 0xfffffe0079c445c8     page_ctr_add+0x63
146076   4%  35% 0.00     1097 0xfffffe0079c445c0     page_ctr_add+0x63
135753   4%  38% 0.00     1169 0xfffffe0079c445c8     page_ctr_sub+0x63
131098   3%  42% 0.00     1166 0xfffffe0079c445c0     page_ctr_sub+0x63
85581   2%  44% 0.00      936 0xfffffe0079c445d0     page_ctr_add+0x63
75776   2%  46% 0.00      975 0xfffffe0079c445d0     page_ctr_sub+0x63
53571   1%  47% 0.00     1043 0xfffffe0079c445d8     page_ctr_add+0x63
50350   1%  49% 0.00     2514 0xfffffe0079c41178     page_get_mnode_freelist+0x120
49466   1%  50% 0.00     2611 0xfffffe0079c41180     page_get_mnode_freelist+0x120
49391   1%  51% 0.00     2489 0xfffffe0079c41190     page_get_mnode_freelist+0x120
49293   1%  53% 0.00     2366 0xfffffe0079c41170     page_get_mnode_freelist+0x120
48835   1%  54% 0.00     2435 0xfffffe0079c41198     page_get_mnode_freelist+0x120
48798   1%  55% 0.00     3400 0xfffffe0079c41140     page_get_mnode_freelist+0x120
48708   1%  56% 0.00     2476 0xfffffe0079c41150     page_get_mnode_freelist+0x120
48599   1%  58% 0.00     2481 0xfffffe0079c41148     page_get_mnode_freelist+0x120
48585   1%  59% 0.00     2370 0xfffffe0079c41188     page_get_mnode_freelist+0x120
48442   1%  60% 0.00     2470 0xfffffe0079c41158     page_get_mnode_freelist+0x120
48308   1%  62% 0.00     2417 0xfffffe0079c41130     page_get_mnode_freelist+0x120
48217   1%  63% 0.00     2700 0xfffffe0079c41138     page_get_mnode_freelist+0x120
47492   1%  64% 0.00     2330 0xfffffe0079c41168     page_get_mnode_freelist+0x120

The page_ctr_add lock refers to ctr_mutex while page_get_mnode_freelist refers to fpc_mutex.
Both of these mutex arrays are sized based on NPC_MUTEX which is currently fixed in size at 16.

Given that modern machines often have many more than 16 CPUs (single-socket Zen going to 64C/128T), the existing static size is likely to pose a more significant problem moving forward.

No data to display

Actions

Also available in: Atom PDF