Skip to content

Conversation

@farshidtz
Copy link
Member

@farshidtz farshidtz commented Mar 21, 2025

@locnnil locnnil force-pushed the rt-conf branch 2 times, most recently from df9840f to d7ccef2 Compare April 2, 2025 18:25
@farshidtz farshidtz requested a review from odadacharles April 3, 2025 12:27
@farshidtz farshidtz removed the request for review from odadacharles June 30, 2025 14:23
@farshidtz farshidtz marked this pull request as ready for review July 3, 2025 16:10
Copy link
Collaborator

@EdoardoBarbieriCanonical EdoardoBarbieriCanonical left a comment

Choose a reason for hiding this comment

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

Added minor comments.

# How-to tune Real-Time Ubuntu using rt-conf

*rt-conf* is a tool that helps users tune their system for real-time responsiveness.
This guide describes how to install and use it on Ubuntu.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we state "[...] on Ubuntu with the real-time kernel" / "[...] on Real-time Ubuntu"? I know it's already in the title, so maybe it's repetitive.

Copy link
Collaborator

Choose a reason for hiding this comment

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

i agree. either of @EdoardoBarbieriCanonical 's suggestion works.
it would be helpful for SEO since your keywords should be featured at the start of your doc / guide.


````{admonition} Developer mode
The snap must be installed with `--devmode` to allow IRQ configuration.
This is due to issue [#67](https://github.com/canonical/rt-conf/issues/67).
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the expected timeframe for fixing this bug?

```{admonition} Kernel command line parameters
Pay attention to the output as it shows platform-specific instructions to complete kernel command line configurations.
Setting kernel command line via rt-conf is not supported on [Ubuntu Core][UC].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the word "parameters" missing here?

_Optional_

The IRQ action chain. A comma-separated list of zero or more device names associated with this interrupt.
For network related, generally is the name of the network interface shown in `ip link show`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't find the second sentence very clear. Do you mean to say "For network-related purposes, the IRQ action chain is generally the name of the network interface, shown in ip link show."?

Tune IRQ affinity <tune-irq-affinity>
Isolate CPUs from general execution with cpusets <isolate-workload-cpusets>

Tune Real-Time Ubuntu using rt-conf <rt-conf-cli>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Tune Real-Time Ubuntu using rt-conf <rt-conf-cli>
Tune Real-time Ubuntu using rt-conf <rt-conf-cli>

For that, refer to :doc:`modify-kernel-boot-parameters`.


.. _cpu-lists:
Copy link
Collaborator

Choose a reason for hiding this comment

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

we don't necessarily need a fix here.
but i think we should have a better structure for naming our targets.
as the doc set grows we can run into conflicts since similar headings can easily appear across pages.

E.g. cpu-configs-cpu-lists or something along this convention would be a more robust target.

@@ -0,0 +1,103 @@
# How-to tune Real-Time Ubuntu using rt-conf
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# How-to tune Real-Time Ubuntu using rt-conf
# How-to tune Real-time Ubuntu using rt-conf

@@ -0,0 +1,103 @@
# How-to tune Real-Time Ubuntu using rt-conf

*rt-conf* is a tool that helps users tune their system for real-time responsiveness.
Copy link
Collaborator

Choose a reason for hiding this comment

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

we don't typically italicize the tool names.

Also would you want to link to the rt-conf repo as part of this intro?
https://github.com/canonical/rt-conf

sudo snap connect rt-conf:etc-default-grub
```
rt-conf uses this access to write a drop-in GRUB config file at `/etc/default/grub.d/60_rt-conf.cfg`.
This file is removed when uninstalling the rt-conf snap.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
This file is removed when uninstalling the rt-conf snap.
This file is removed when you uninstall the rt-conf snap.

```shell
sudo snap connect rt-conf:etc-default-grub
```
rt-conf uses this access to write a drop-in GRUB config file at `/etc/default/grub.d/60_rt-conf.cfg`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
rt-conf uses this access to write a drop-in GRUB config file at `/etc/default/grub.d/60_rt-conf.cfg`.
rt-conf uses this access to write a drop-in GRUB config file at {file}`/etc/default/grub.d/60_rt-conf.cfg`.

sudo snap install rt-conf --beta --devmode
```


Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change

@@ -0,0 +1,103 @@
# How-to tune Real-Time Ubuntu using rt-conf

*rt-conf* is a tool that helps users tune their system for real-time responsiveness.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
*rt-conf* is a tool that helps users tune their system for real-time responsiveness.
*rt-conf* is a tool that can be used to tune your system for real-time responsiveness.

Speaking to the user.

# How-to tune Real-Time Ubuntu using rt-conf

*rt-conf* is a tool that helps users tune their system for real-time responsiveness.
This guide describes how to install and use it on Ubuntu.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
This guide describes how to install and use it on Ubuntu.
This guide describes how to install and use it on Real-time Ubuntu.


The default configuration file is located at `/var/snap/rt-conf/common/config.yaml`:

```{literalinclude} rt-conf-config.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think it's a good idea to maintain this file here since it can change upstream in rt-conf without warning -- unless we want to keep this version a little different from the upstream one?

I would suggest pulling this file into real-time-ubuntu from upstream since it's a literal include without further explanation / annotations / modifications in the YAML file itself.

We can copy the file over each time the doc builds with the urllib library.

  1. Add this to the "import" section of conf.py:
    from urllib.request import urlretrieve
    
  2. Add this towards the end of conf.py:
    # Import files from external URLs
    
    urlretrieve (
        "https://raw.githubusercontent.com/canonical/rt-conf/refs/heads/main/config.yaml",
        "how-to/rt-conf-config.yaml"
    )
    

Copy link
Member Author

@farshidtz farshidtz Jul 24, 2025

Choose a reason for hiding this comment

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

I agree that this isn't ideal.

The config file that is in the main branch of the source may not always be compatible with the revisions users install from latest/stable. Main branch is usually ahead, with newer additions.

As discussed, I'll drop the full config example and try to add smaller excerpts to the reference.

sudo snap stop --disable rt-conf
```

### Change configuration path
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think the section on "Change configuration file path" should be under the "Configure" section instead of "Run.

sudo snap stop --disable rt-conf
```

### Change configuration path
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
### Change configuration path
### Change configuration file path

suggest moving it up.

```

```{note}
The configuration file must be in a location accessible to the snap, such as a user home directory.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The configuration file must be in a location accessible to the snap, such as a user home directory.
The configuration file must be in a location accessible to the snap, such as a user's home directory.

Copy link
Collaborator

@AnneCYH AnneCYH left a comment

Choose a reason for hiding this comment

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

hey @farshidtz , just some suggestions for your consideration.
Thanks!

Copy link
Collaborator

@AnneCYH AnneCYH left a comment

Choose a reason for hiding this comment

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

Hey @farshidtz , thanks for this.
I left some comments; do consider and lemme know if you have any questions, thanks!

@@ -0,0 +1,208 @@
# rt-conf YAML configuration schema

The following schema reflects all settings available in the configuration file of the `rt-conf` tool
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The following schema reflects all settings available in the configuration file of the `rt-conf` tool
The following schema reflects all settings available in the configuration file of the `rt-conf` tool.


The following schema reflects all settings available in the configuration file of the `rt-conf` tool

There are three top-level dictionaries in the configuration file:, {ref}`kcmd`, {ref}`irqt` and {ref}`cpug`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
There are three top-level dictionaries in the configuration file:, {ref}`kcmd`, {ref}`irqt` and {ref}`cpug`.
There are three top-level dictionaries in the configuration file: {ref}`kcmd`, {ref}`irqt` and {ref}`cpug`.

@@ -0,0 +1,103 @@
# How-to tune Real-Time Ubuntu using rt-conf
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# How-to tune Real-Time Ubuntu using rt-conf
(tune-rt-conf)=
# How-to tune Real-Time Ubuntu using rt-conf

# rt-conf YAML configuration schema

The following schema reflects all settings available in the configuration file of the `rt-conf` tool

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
```{seealso}
- {ref}`tune-rt-conf`
```


_Optional_

{ref}`kernel-boot-parameters` that affects real-time behavior
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{ref}`kernel-boot-parameters` that affects real-time behavior
{ref}`kernel-boot-parameters` that affect real-time behavior.


Human-readable flow handler name as defined by the irq chip driver.
Example values are:
* `edge`
Copy link
Collaborator

Choose a reason for hiding this comment

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

the potential values are arbitary right? as in anything is possible?


_Optional_

Runtime configurations that aren't persisted, related to cpu power management.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as previously. I am not clear how these 2 sentences are "connected". I am missing something but it's not clear what.

_Optional_

Runtime configurations that aren't persisted, related to cpu power management.
A list of dictionaries with the CPU scaling governor and the cpu list to be applied.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
A list of dictionaries with the CPU scaling governor and the cpu list to be applied.
A list of dictionaries with the CPU scaling governor and the CPU list to be applied.

Anyways please do a quick search-and-replace to keep the use of CPU consistent.

_Required_

A string formatted as {ref}`cpu-lists`.
Specifies which cpus are going to be configured with the scaling governor specified in the item.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll limit my comments but reword to say what the user does with the command. Do apply this to the rest of the params.

Suggested change
Specifies which cpus are going to be configured with the scaling governor specified in the item.
Specify which CPUs are going to be configured with the scaling governor specified in the item.


_Required_

The chosen scaling governor.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The chosen scaling governor.
Chose the scaling governor.

locnnil and others added 3 commits August 27, 2025 13:04
* feat: update rt-conf yaml reference

Signed-off-by: Lincoln Wallace <[email protected]>

* chore(.custom_wordlist): ignore nocbs

Signed-off-by: Lincoln Wallace <[email protected]>

* feat: put validated parameters information on an admonition note

Signed-off-by: Lincoln Wallace <[email protected]>

* fix: change append -> parameters

Signed-off-by: Lincoln Wallace <[email protected]>

* refact: improve explanation regarding validated values

Co-authored-by: Farshid Tavakolizadeh <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>

* feat: specify the type for the list itens

Signed-off-by: Lincoln Wallace <[email protected]>

* fix: add period to end sentence

Signed-off-by: Lincoln Wallace <[email protected]>

* feat!: drop url

Signed-off-by: Lincoln Wallace <[email protected]>

* feat: add requirement level for kernel-cmdline.parameters key

Signed-off-by: Lincoln Wallace <[email protected]>

* feat: drop table and add simple bulleted list with references

Note that nohz_full and rcu_nocbs aren't present on the reference

Signed-off-by: Lincoln Wallace <[email protected]>

---------

Signed-off-by: Lincoln Wallace <[email protected]>
Co-authored-by: Farshid Tavakolizadeh <[email protected]>
@farshidtz farshidtz marked this pull request as draft October 19, 2025 14:08
@farshidtz
Copy link
Member Author

farshidtz commented Oct 19, 2025

@locnnil looks like the how-to (docs/how-to/rt-conf-cli.md) has gone missing with the history rewrites. Please recover it.

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