Bug 1429640

Summary: [rt] ipc/msg: Implement lockless pipelined wakeups
Product: Red Hat Enterprise Linux 7 Reporter: Clark Williams <williams>
Component: kernel-rtAssignee: Clark Williams <williams>
kernel-rt sub component: Memory Management QA Contact: Jiri Kastner <jkastner>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bhu, jshortt, lgoncalv, williams
Version: 7.4   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:02:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1353018, 1410158    
Attachments:
Description Flags
ipc/msg: Implement lockless pipelined wakeups
none
ipc/msg: Implement lockless pipelined wakeups (v4) none

Description Clark Williams 2017-03-06 18:10:19 UTC
Move the wakeup_process() invocation so it is not done under
the perm->lock by making use of a lockless wake_q. With this change, the
waiter is woken up once the message has been assigned and it does not
need to loop on SMP if the message points to NULL. In the signal case we
still need to check the pointer under the lock to verify the state.

This change should also avoid the introduction of preempt_disable() in
-RT which avoids a busy-loop which pools for the NULL -> !NULL
change if the waiter has a higher priority compared to the waker.

Comment 2 Clark Williams 2017-03-06 18:12:30 UTC
Created attachment 1260532 [details]
ipc/msg: Implement lockless pipelined wakeups

Ported to -586 build of RHEL-RT

Comment 3 Clark Williams 2017-03-07 14:46:33 UTC
tested with scratch build: 

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=12694532

Comment 6 Luis Claudio R. Goncalves 2017-04-11 20:53:38 UTC
Created attachment 1270949 [details]
ipc/msg: Implement lockless pipelined wakeups (v4)

Comment 10 errata-xmlrpc 2017-08-01 19:02:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2077

Comment 11 errata-xmlrpc 2017-08-02 00:25:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2077