Skip to content

Conversation

@jpagadal
Copy link

recipes-support: Add resource-tuner recipe.

Resource Tuner is a lightweight daemon that monitors and dynamically regulates CPU, memory, and I/O usage of user-space processes. It leverages kernel interfaces like procfs, sysfs and cgroups to enforce runtime policies, ensuring system stability and performance in embedded and resource-constrained environments.

Copy link
Contributor

@lumag lumag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On top of that:

  • Commit message is missing.
  • Commit subject doesn't follow the established practice
  • The PV is invalid, the relase is 0.1, not 1.0.0
  • SRCREV doesn't point to the release commit.

@koenkooi
Copy link
Contributor

Please avoid using += when a regular multiline variable works just fine. The += operator adds a lot of parsing overhead than multiline variables don't.

@lumag
Copy link
Contributor

lumag commented Nov 2, 2025

No stray merge commits, thank you.

and policy enforcement using kernel interfaces like cgroups and sysfs."

SRC_URI = "git://github.com/qualcomm/resource-tuner.git;protocol=https;branch=main"
SRCREV = "26ff78ec039431538c5fa0c6b6fd30d9883fe486"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SRCREV doesn't belong to any of the tags. At the same time you've named the recipe foo_1.0.0, whcih means that you've packaged the 1.0.0 release of the tuner.


inherit cmake pkgconfig systemd

EXTRA_OECMAKE += "${S}/Build"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF"

SYSTEMD_SERVICE:${PN} = "resource-tuner.service"
FILES:${PN} += "${sysconfdir}/resource-tuner/**"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double asterisk


inherit cmake pkgconfig systemd

PACKAGECONFIG ??= "signals cli state-detector tests"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: we try to keep lists sorted, swapping signals and cli would help with that. I've marked this as a nit since PACKAGECONFIG entries often benefit from being sorted by effect.

@jpagadal jpagadal force-pushed the master branch 2 times, most recently from 00ee08f to f44b3b2 Compare November 18, 2025 16:43
PACKAGECONFIG[state-detector] = "-DBUILD_STATE_DETECTOR=ON,-DBUILD_STATE_DETECTOR=OFF"
PACKAGECONFIG[tests] = "-DBUILD_TESTS=ON,-DBUILD_TESTS=OFF"

FILES:${PN} += "${sysconfdir}/resource-tuner/common/*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still should be a separate package, if these are only for tests.

Copy link
Author

@jpagadal jpagadal Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are intended for the main package because they are part of the core functionality required by the daemon.
Custom and test configs are only needed for running test-cases, while in prod builds configs present in common directory are needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line disagrees with you:

FILES:${PN}-tests += "${sysconfdir}/resource-tuner/custom/* \

Add initial BitBake recipe for resource-tuner in the recipe-support layer.

Signed-off-by: Jagadeesh Pagadala <[email protected]>
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2998c54c288b081076c9af987bdf4838"

SRC_URI = "git://github.com/qualcomm/resource-tuner.git;protocol=https;branch=main"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add ;tag=v${PV} to the SRC_URI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants