Bug 771350 - Use qmf::posix::EventNotifier to improve performance on Linux
Summary: Use qmf::posix::EventNotifier to improve performance on Linux
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Matahari
Classification: Retired
Component: matahari
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Zane Bitter
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks: 751431
TreeView+ depends on / blocked
 
Reported: 2012-01-03 13:15 UTC by Russell Bryant
Modified: 2016-04-26 20:22 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-17 12:30:18 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.