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
scheduler: added default_irq_smp_affinity option #306
Conversation
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
I know the comment above and commit message could be considered a sort of a documentation, but really, it is not. Can we start a practice of adding documentation to every new feature such as this directly in the doc/manual/... ? |
It's good idea, I will try to transform the commit message into the asciidoc text. |
I've tested the default behaviour is unchanged + calc/ignore/cpulist seem to work too. Rollback also works. After the docs are added, happy to "lgtm". |
An attempt to document this change. After more thinking about it, I think this is not the best way to go. We should probably write such documentation into the code (e.g. by using docstrings) and then automatically generate structured reference guide from it. But it will require more man power to kick this in. |
We can keep the whole asciidoc documentation (and further extend it), but I think that the chapter regarding the plugins and their options/parameters should be auto generated. This will allow easy maintenance. |
Maybe there are still some 'wording' problems in the documentation added by this commit, waiting for feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the docs! Looks good, minor nits a documentation writer or a native English speaker should confirm.
`scheduler`:: | ||
Allows tuning of scheduling priorities, processes/threads/IRQs affinities, and CPU cores isolation. | ||
+ | ||
The `default_irq_smp_affinity` parameter controls what *Tuned* will write to the `/proc/irq/default_smp_affinity`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
s/what Tuned will write/the values Tuned writes/
s/to the/to/
Even though the file is "unique" I believe 'the' should be dropped as it is is "name". A document person should review this.
The following values are supported: | ||
+ | ||
-- | ||
** `calc` content of the `/proc/irq/default_smp_affinity` will be calculated from the `isolated_cores` parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/of the/of/ (everywhere where you refer to the file :)
+ | ||
-- | ||
** `calc` content of the `/proc/irq/default_smp_affinity` will be calculated from the `isolated_cores` parameter. | ||
Non-isolated cores are calculated as an inversion of the `isolated_cores`. Then the intersection of the non-isolated cores |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/of the isolated_cores
/of isolated_cores
/ I don't see isolated_cores mentioned anywhere, therefore I'd drop it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mentioned on the previous line. I think the parameter isolated_cores
should be described in its own paragraph preceding this text, but it's out of the context of this commit, so I didn't add it.
** `calc` content of the `/proc/irq/default_smp_affinity` will be calculated from the `isolated_cores` parameter. | ||
Non-isolated cores are calculated as an inversion of the `isolated_cores`. Then the intersection of the non-isolated cores | ||
and the previous content of the `/proc/irq/default_smp_affinity` is written to the `/proc/irq/default_smp_affinity`. | ||
If the intersection is empty set, then just the non-isolated cores are written to the `/proc/irq/default_smp_affinity`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/is empty/is an empty/
If the intersection is empty set, then just the non-isolated cores are written to the `/proc/irq/default_smp_affinity`. | ||
This behavior is the default if the parameter `default_irq_smp_affinity` is omitted. | ||
** `ignore` *Tuned* will not touch `/proc/irq/default_smp_affinity`. | ||
** cpulist like e.g. `1,3-4` the cpulist is unpacked and directly written to the `/proc/irq/default_smp_affinity`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/cpulist like e.g./for a cpulist such as/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's list describing 'calc', 'ignore', and cpulist parameters and it's introduced by the sentence: 'The following values are supported:', that's why I didn't want to write 'for a cpulist' but just 'cpulist'. I added dashes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reformatted the text to use asciidoc description, but I am not sure whether it looks better, nor whether the syntax I used is correct :)
@courtneypacheco , could you please go over the docs? Thank you! |
I addressed most of the issues except those where I put comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor nit. Looks good to me otherwise, thank you. I've asked Courtney to review this as a native speaker of English. You may want to give her a day or two before this merges. Thank you. /cc @courtneypacheco
`ignore`:: | ||
*Tuned* will not touch `/proc/irq/default_smp_affinity`. | ||
cpulist such as `1,3-4`:: | ||
The cpulist is unpacked and directly written to `/proc/irq/default_smp_affinity`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/directly written/written directly/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know :) but I changed it.
The option 'default_irq_smp_affinity' affects what will be written to the /proc/irq/default_smp_affinity. The option supports the following values: calc: Content of the /proc/irq/default_smp_affinity will be calculated from the 'isolated_cores'. Non-isolated cores are calculated as an inversion of the 'isolated_cores'. Then the intersection of the non-isolated cores and the previous content of the /proc/irq/default_smp_affinity is written to the /proc/irq/default_smp_affinity. If the intersection is empty set, then just the non-isolated cores are written to the /proc/irq/default_smp_affinity. This behavior is the default if option 'default_irq_smp_affinity' is not specified. ignore: The /proc/irq/default_smp_affinity is not touched by Tuned. cpulist like e.g. '1,3-4': The cpulist is unpacked and directly written to the /proc/irq/default_smp_affinity Examples: [scheduler] isolated_cores = 1, 2 default_irq_smp_affinity = calc [scheduler] isolated_cores = 1, 2 default_irq_smp_affinity = ignore [scheduler] isolated_cores = 1, 3 default_irq_smp_affinity = 2, 4 Resolves: rhbz#1896348 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The rendered asciidoc looks OK to me. Still /lgtm |
It is unlikely we are getting a native-speaker review of the docs within a reasonable timeframe. I believe this looks good and is good to go, @yarda |
OK, thanks for info. I also think there is no point in blocking the merge due to it. We can update the text anytime later. |
The option 'default_irq_smp_affinity' affects what will be written to the
/proc/irq/default_smp_affinity. The option supports the following values:
calc:
Content of the /proc/irq/default_smp_affinity will be calculated from
the 'isolated_cores'. Non-isolated cores are calculated as an inversion
of the 'isolated_cores'. Then the intersection of the non-isolated cores
and the previous content of the /proc/irq/default_smp_affinity is
written to the /proc/irq/default_smp_affinity. If the intersection is
empty set, then just the non-isolated cores are written to the
/proc/irq/default_smp_affinity. This behavior is the default if
option 'default_irq_smp_affinity' is not specified.
ignore:
The /proc/irq/default_smp_affinity is not touched by Tuned.
cpulist like e.g. '1,3-4':
The cpulist is unpacked and directly written to the
/proc/irq/default_smp_affinity
Examples:
[scheduler]
isolated_cores = 1, 2
default_irq_smp_affinity = calc
[scheduler]
isolated_cores = 1, 2
default_irq_smp_affinity = ignore
[scheduler]
isolated_cores = 1, 3
default_irq_smp_affinity = 2, 4
Resolves: rhbz#1896348
Signed-off-by: Jaroslav Škarvada jskarvad@redhat.com