[LU-11004] Serialize procfs access to scp_hist_reqs using mutex Created: 07/May/18  Updated: 03/Jul/18  Resolved: 03/Jul/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.12.0

Type: Bug Priority: Minor
Reporter: Andriy Skulysh Assignee: Andriy Skulysh
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

scp_hist_reqs list can be quite big thus a lot of userland processes can waste CPU power in spinlock cycles.

crash> ps |grep lctl | wc -l
75
crash> bt 31549
PID: 31549  TASK: ffff881fe23f9700  CPU: 16  COMMAND: "lctl"
 #0 [ffff881fff805e70] crash_nmi_callback at ffffffff81045982
 #1 [ffff881fff805e80] nmi_handle at ffffffff8163da99
 #2 [ffff881fff805ec8] do_nmi at ffffffff8163dbb0
 #3 [ffff881fff805ef0] end_repeat_nmi at ffffffff8163ced3
    [exception RIP: _raw_spin_lock+50]
    RIP: ffffffff8163c2c2  RSP: ffff88154421fe18  RFLAGS: 00000216
    RAX: 0000000000003126  RBX: 0000000000000000  RCX: 000000000000dc2c
    RDX: 000000000000dc4a  RSI: 000000000000dc4a  RDI: ffff881b5f470030
    RBP: ffff88154421fe18   R8: 000000000000000a   R9: 00000000000006e9
    R10: 0000000000000000  R11: ffff88154421fc76  R12: ffff881b5f470000
    R13: ffff881b5f470030  R14: ffff881fee3a7a00  R15: ffff8817033fd3e0
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
--- <NMI exception stack> ---
 #4 [ffff88154421fe18] _raw_spin_lock at ffffffff8163c2c2
 #5 [ffff88154421fe20] ptlrpc_lprocfs_svc_req_history_next at ffffffffa0dc2c5b [ptlrpc]
 #6 [ffff88154421fe78] seq_read at ffffffff81202c9b
 #7 [ffff88154421fee8] proc_reg_read at ffffffff8124911d
 #8 [ffff88154421ff08] vfs_read at ffffffff811decfc
 #9 [ffff88154421ff38] sys_read at ffffffff811df84f
#10 [ffff88154421ff80] system_call_fastpath at ffffffff81645009


 Comments   
Comment by Gerrit Updater [ 07/May/18 ]

Andriy Skulysh (c17819@cray.com) uploaded a new patch: https://review.whamcloud.com/32307
Subject: LU-11004 ptlrpc: Serialize procfs access to scp_hist_reqs using mutex
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a902f580f84880700cda44e12b43d360ad1a28d8

Comment by Gerrit Updater [ 03/Jul/18 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32307/
Subject: LU-11004 ptlrpc: Serialize procfs access to scp_hist_reqs using mutex
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 413a738a37d7a8cacc41f5843bfe2aef286be62b

Comment by Peter Jones [ 03/Jul/18 ]

Landed for 2.12

Generated at Sat Feb 10 02:40:06 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.