GNOME Bugzilla – Bug 770628
multiqueue: Add higher-resolution low/high-watermark properties
Last modified: 2016-08-31 09:57:52 UTC
Add new low/high-watermark properties, which are of type double, and given in range 0.0-1.0. This makes it possible to set low/high watermarks with greater resolution, which is useful with large multiqueue max sizes and watermarks like 0.5% for example. low/high-percent properties remain for backwards compatibility, and are marked as "deprecated". This is the multiqueue counterpart to https://bugzilla.gnome.org/show_bug.cgi?id=769449 .
Created attachment 334504 [details] [review] 0001: Rename percent/percent_changed to buffering_percent(_changed)
Created attachment 334505 [details] [review] 0002: Distinguish between buffering percentage and buffering level
Created attachment 334506 [details] [review] 0003: Add higher-resolution low/high-watermark properties
commit 5988095f90d273fe11725deac2d73833a336ee87 Author: Carlos Rafael Giani <dv@pseudoterminal.org> Date: Wed Aug 31 09:49:03 2016 +0200 multiqueue: Add higher-resolution low/high-watermark properties low/high-watermark are of type double, and given in range 0.0-1.0. This makes it possible to set low/high watermarks with greater resolution, which is useful with large multiqueue max sizes and watermarks like 0.5%. Also adding a test to check the fill and watermark level behavior. https://bugzilla.gnome.org/show_bug.cgi?id=770628 commit 67874ea86d3eaa1197d34477c41d18f82e15d790 Author: Carlos Rafael Giani <dv@pseudoterminal.org> Date: Wed Aug 31 09:48:53 2016 +0200 multiqueue: Distinguish between buffering percentage and buffering level To make the code clearer, and to facilitate future improvements, introduce a distinction between the buffering level and the buffering percentage. Buffering level: the queue's current fill level. The low/high watermarks are in this range. Buffering percentage: percentage relative to the low/high watermarks (0% = low watermark, 100% = high watermark). To that end, get_percentage() is renamed to get_buffering_level(). Also, low/high_percent are renamed to low/high_watermark to avoid confusion. mq->buffering_percent values are now normalized in the 0..100 range for buffering messages inside update_buffering(), and not just before sending the buffering message. Finally the buffering level range is parameterized by adding a new constant called MAX_BUFFERING_LEVEL. https://bugzilla.gnome.org/show_bug.cgi?id=770628 commit e83412b4fd9fe486ba48b7e89f600b68544e2dbc Author: Carlos Rafael Giani <dv@pseudoterminal.org> Date: Wed Aug 31 09:48:38 2016 +0200 multiqueue: Rename percent/percent_changed to buffering_percent(_changed) This is a prerequisite for subsequent commits, and makes queue2 and multiqueue code a little more consistent. https://bugzilla.gnome.org/show_bug.cgi?id=770628