Bug 1677175

Summary: tuned realtime-virtual-host profile missing space before skew_tick cmdline parameter
Product: Red Hat Enterprise Linux 8 Reporter: Juri Lelli <jlelli>
Component: grub2Assignee: Bootloader engineering team <bootloader-eng-team>
Status: CLOSED DUPLICATE QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: fmartine, jeder, jlelli, jskarvad, lcapitulino, olysonek, pezhang, thozza
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-17 06:42:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1817732    
Attachments:
Description Flags
/boot/loader/entries/*-$(uname -r).conf
none
/etc/grub2*.cfg
none
grubenv none

Description Juri Lelli 2019-02-14 08:28:13 UTC
Description of problem:
tuned realtime-virtual-host profile adds tuned_params to GRUB cmdline for
installed kernels. When the profile is enabled several parameters are
added to configure the system for low latency. skew_tick=1 is one of them.

skew_tick=1 is the first parameter that gets concatenated at the end of
the current cmdline. However, a space is missing before it, so the
resulting cmdline ends up with something like the following

$ cat /proc/cmdline
BOOT_IMAGE=(hd0,msdos3)/vmlinuz-4.18.0-68.rt9.123.el8.x86_64 root=UUID=7f8ade5a-f325-404a-a6ea-8fd9ffc1affb ro crashkernel=auto rhgb quiet console=ttyS0,115200skew_tick=1 isolcpus=5,7-11 intel_pstate=disable nosoftlockup nohz=on nohz_full=5,7-11 rcu_nocbs=5,7-11

In a case like this skew_tick=1 is not correctly parsed by the early boot
stages of the kernel and the feature is not enabled (potentially
introducing latency spikes at runtime).

Version-Release number of selected component (if applicable):
2.10.0-14.el8

How reproducible:
Always after a new kernel is installed and profile (re-)enabled.

Steps to Reproduce:
1. Install a kernel-rt package
2. Enable realtime-virtual-host profile
3. Reboot
4. Check cmdline (cat /proc/cmdline)

Actual results:
Verify that a space is missing before skew_tick=1 parameter.

Expected results:
A space should be present before skew_tick=1 (and feature correctly enabled).

Additional info:
Checking that the skew_tick feature is enabled can be further done by tracing
an idle system for a few seconds and checking that tick is slightly skewed on
the CPUs.

Comment 1 Ondřej Lysoněk 2019-02-19 10:25:46 UTC
I think this is a grub2 bug. To confirm that, can you please attach the following files from the affected system?
/boot/loader/entries/*-$(uname -r).conf
/etc/grub2*.cfg
/boot/grub2/grubenv

Comment 2 Ondřej Lysoněk 2019-02-21 10:21:41 UTC
*** Bug 1679430 has been marked as a duplicate of this bug. ***

Comment 3 Ishan Kulkarni 2019-02-22 01:04:08 UTC
Hi Ondřej,

Thanks for looking into this. Here are the required files :

Comment 4 Ishan Kulkarni 2019-02-22 01:05:48 UTC
Created attachment 1537293 [details]
/boot/loader/entries/*-$(uname -r).conf

Comment 5 Ishan Kulkarni 2019-02-22 01:06:47 UTC
Created attachment 1537294 [details]
/etc/grub2*.cfg

Comment 6 Ishan Kulkarni 2019-02-22 01:07:20 UTC
Created attachment 1537295 [details]
grubenv

Comment 7 Ondřej Lysoněk 2019-02-25 09:31:40 UTC
Thanks.

The problem is that grub doesn't put spaces between expanded variables when evaluating the BLS entries. For example the BLS entry attached in comment#4 contains 'options $kernelopts $tuned_params', but grub doesn't put a space between the expanded $kernelopts and $tuned_params variables.

Comment 8 Javier Martinez Canillas 2020-05-27 10:52:39 UTC
This seems to be a duplicate of Bug #1669252 that was already fixed in grub2-2.02-80.el8.

Could you please test if the issue is still present?

Comment 9 Javier Martinez Canillas 2020-07-17 06:42:22 UTC
Closing as duplicate of bug #1669252 per Comment 8. Please feel free to re-open if that's not the case.

*** This bug has been marked as a duplicate of bug 1669252 ***