KCGroups in KDEreview

Kevin Ottens ervin at kde.org
Sun Nov 29 18:35:38 GMT 2020


Hello,

On Friday, 20 November 2020 14:55:16 CET Henri Chain wrote:
> KCgroups has been moved to KDEReview !
> What is that, you ask ? It's a library that wraps the systemd dbus API to
> expose a higher-level concept of desktop application and allow control of
> its system resource usage (CPU, RAM, IO, etc).
> 
> It relies on the recent ability of plasma to launch applications in their
> own systemd scopes, with correspond to cgroups and provides a more robust
> definition for an application (more details at
> https://lwn.net/Articles/834329/ ) .
> 
> The main use of the library is to expose related resource control settings
> for those applications, at a user space level that other KDE applications
> and frameworks can use, including consumption straight from QML as
> demonstrated in the test application.
> 
> KCgroups is intended to become a (Tier 1) framework. A first user of this
> library might be the foreground window CPU booster daemon that is available
> here:
> https://invent.kde.org/libraries/kcgroups/-/tree/work/foreground-booster
> 
> Packages are already available for both Neon and Arch Linux.
> 
> Looking forward to your feedback and ideas for using this,

Glad to see this come to fruition.

One concern regarding use with other libraries:
 * the OPTIONAL_GADGET use introduce names that I could see potentially 
clashing with application code or code in third party libraries, I wonder if 
they should be moved in a namespace as well (as in "like optional") or have a 
K name at least;

Minor things I found:
 * tests/main.cpp needs to have some of its includes cleaned up (at a glance 
QDebug and QTimer aren't needed there);
 * tests/main.qml should have better ids for its elements IMHO, often those 
manual tests end up used as examples by people and having better readability 
helps (also avoids having people copying and pasting shameful things). ;-)

That's not much but I'm obviously biased by the fact that we discussed this 
API together already. :-)

Regards.
-- 
Kevin Ottens, http://ervin.ipsquad.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20201129/51bef571/attachment.sig>


More information about the Kde-frameworks-devel mailing list