diff options
| author | NeilBrown <[email protected]> | 2018-02-20 13:23:38 +1100 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2018-02-22 15:06:36 +0100 |
| commit | daa5611c716a6dbd234c7ebe4ed2c05eeb96b538 (patch) | |
| tree | 504b39a915d6a2371e267f071503b1e284b12a41 /tools/perf/scripts/python | |
| parent | ef8e5dbbb09035a0c41aa47a328e6248702d4d2b (diff) | |
staging: lustre: fid: convert lcs_mutex to a spinlock
There is only one place where this lock is held
while the task might sleep - in
ldebugfs_fid_space_seq_write()
while ldebugfs_fid_write_common() is called.
This call can easily be taken out of the locked region
by asking it to parse the user data into a local variable,
and then copying that variable into ->lcs_space while
holding the lock.
Note that ldebugfs_gid_write_common returns >0 on
success, so use that to gate updating ->lcs_space.
So make that change, and convert lcs_mutex to a spinlock
named lcs_lock. spinlocks are slightly cheaper than mutexes
and using one makes is clear that the lock is only held for
a short time.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions