Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builtin functions: added calc_isolated_cores function #453

Merged

Conversation

yarda
Copy link
Contributor

@yarda yarda commented Aug 8, 2022

The calc_isolated_cores function expands to the list of cores to
isolate. It accepts optional argument which specifies how many cores
from each socket reserve for housekeeping. If not specified, one core
from each socket is reserved for housekeeping.

Example:
Machine with 2 sockets, each 4 cores, using the following user variable
configuration file, e.g. /etc/tuned/realtime-variables.conf:
isolated_cores=${f:calc_isolated_cores:2}

It will expand to:
isolated_cores=2, 3, 6, 7

I.e. cores 0, 1 and 4, 5 will be used for housekeeping.

Resolves: rhbz#2093847

Signed-off-by: Jaroslav Škarvada jskarvad@redhat.com

@yarda yarda force-pushed the builtin_function_calc_isolated_cores branch from 2b70303 to 6570f91 Compare August 8, 2022 21:44
@yarda
Copy link
Contributor Author

yarda commented Aug 8, 2022

EPEL-7 failure is probably caused by some changes on the testing farm.

@yarda yarda force-pushed the builtin_function_calc_isolated_cores branch 2 times, most recently from 6a32621 to cbcc000 Compare August 8, 2022 22:58
@yarda yarda requested a review from CZerta August 8, 2022 23:04
@yarda
Copy link
Contributor Author

yarda commented Aug 9, 2022

/packit build

return None
cpus_reserve = 1
if len(args) > 0:
if not args[0].isdecimal() or int(args[0]) < 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't there be int(args[0]) <= 0 to always have at least one housekeeping core? If there can be no isolated core the error log on next line probably should say ... non-negative integer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

0 is valid setting - to have no housekeeping core. I will update the error message.

The calc_isolated_cores function expands to the list of cores to
isolate. It accepts optional argument which specifies how many cores
from each socket reserve for housekeeping. If not specified, one core
from each socket is reserved for housekeeping.

Example:
Machine with 2 sockets, each 4 cores, using the following user variable
configuration file, e.g. /etc/tuned/realtime-variables.conf:
isolated_cores=${f:calc_isolated_cores:2}

It will expand to:
isolated_cores=2, 3, 6, 7

I.e. cores 0, 1 and 4, 5 will be used for housekeeping.

Also updated the TuneD profiles to use this builtin function for
isolated_cores preset.

Resolves: rhbz#2093847

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
@yarda yarda force-pushed the builtin_function_calc_isolated_cores branch from cbcc000 to 39e6d14 Compare August 9, 2022 11:52
Copy link
Contributor

@CZerta CZerta left a comment

Choose a reason for hiding this comment

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

LGTM

@yarda yarda merged commit f4f4d2b into redhat-performance:master Aug 9, 2022
11 of 13 checks passed
@yarda yarda deleted the builtin_function_calc_isolated_cores branch August 9, 2022 14:41
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.

None yet

2 participants