Bug 771350

Summary: Use qmf::posix::EventNotifier to improve performance on Linux
Product: [Retired] Matahari Reporter: Russell Bryant <rbryant>
Component: matahariAssignee: Zane Bitter <zbitter>
Status: CLOSED WONTFIX QA Contact: Dave Johnson <dajohnso>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: astokes, matahari-maint, rbryant, walters, whayutin, zbitter
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 12:30:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 751431    

Description Russell Bryant 2012-01-03 13:15:25 UTC
QMF now has an event based mechanism for getting notified that there are incoming messages to process.  Using this instead of a polling approach will improve performance.

For reference, here is a similar change made to pacemaker-cloud:

https://github.com/pacemaker-cloud/pacemaker-cloud/commit/ef9a99b6a0954db75d3bbac5c31e2ceaa5575979

Also note that this is Linux specific.  The previous approach will still be needed for Windows (unless there is a separate EventNotifier implementation for Windows).

Comment 1 Russell Bryant 2012-03-01 19:51:21 UTC
I took a look at this and it's not quite as easy as I hoped.  It actually doesn't help anything as long as we're using the glib main loop.  You can have the main loop poll an fd for you, but it's still waking up the process just as often to do so as it was before.  You can't just have it block on poll().

I think the best thing to do here would be to consider switching to libqb.

Comment 2 Colin Walters 2012-03-14 14:35:00 UTC
(In reply to comment #1)
> I took a look at this and it's not quite as easy as I hoped.  It actually
> doesn't help anything as long as we're using the glib main loop.  You can have
> the main loop poll an fd for you, but it's still waking up the process just as
> often to do so as it was before.  You can't just have it block on poll().

I'm likely missing some context here, but that just sounds wrong.  The GLib mainloop *definitely* supports passing -1 as a timeout to poll().  If you suspect there's a bug or deficiency, feel free to file a bug at http://bugzilla.gnome.org, component glib.