aboutsummaryrefslogtreecommitdiff
path: root/drivers/clocksource/time-pistachio.c
diff options
context:
space:
mode:
authorMike Marciniszyn <[email protected]>2017-03-20 17:26:26 -0700
committerDoug Ledford <[email protected]>2017-04-05 14:45:09 -0400
commitb58fc8049790ca780fb42bd2faabe9b921aedf44 (patch)
treeac50f185872ee8996710f6f0a57c91e2be4e76f6 /drivers/clocksource/time-pistachio.c
parent243d9f436f89f95c304011bd32485afc27581986 (diff)
IB/hfi1: Eliminate synchronize_rcu() in mr delete
The synchronize_rcu() call can be eliminated to improve memory deregistration performance. There are two key fields involved: - The rcu pointer itself - the lkey_published field To close the window between the rcu read of the mregion pointer and the reference count the code should: 1. To lkey/rkey validation (reader) Read the rcu pointer. If the pointer is non-NULL, get a reference. To the current validation tests use a READ_ONCE() on the lkey_published. Upon any failure release the reference. 2. To the remove logic (delete) Insure the published is zeroed prior to setting the pointer to NULL. This requires using rcu_assign_pointer() to insure lkey_published is written prior to the NULL. 3. To the insert logic (add) Insure the published is set use an rcu_assign_pointer() to insure the pointer is after all MR fields. Reviewed-by: Dennis Dalessandro <[email protected]> Signed-off-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
Diffstat (limited to 'drivers/clocksource/time-pistachio.c')
0 files changed, 0 insertions, 0 deletions