Bug 1804326 - Print to kernel log when workqueue cpumask is set
Summary: Print to kernel log when workqueue cpumask is set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: RHCOS
Version: 4.4
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
: 4.5.0
Assignee: Micah Abbott
QA Contact: Michael Nguyen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-18 17:11 UTC by jianzzha
Modified: 2020-07-13 17:16 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:15:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:16:10 UTC

Description jianzzha 2020-02-18 17:11:06 UTC
The current tuned-workqueue.sh:
https://gitlab.cee.redhat.com/coreos/redhat-coreos/commit/8bdc6863425ec6f95c98817e470496dcef4bf62a

two issues:
1) . /lib/dracut-lib.sh. I checked the initramfs the it should be  /usr/lib/dracut-lib.sh
2)  to log the message, please use echo "..." >> /dev/kmsg. This way we can retrieve the log via dmesg

Comment 1 jianzzha 2020-02-18 17:20:34 UTC
without dracut-lib.sh loaded from the right place, this script won't work and /sys/devices/virtual/workqueue/cpumask won't be set correctly - That's the whole point of this tuned-workqueue.sh. And kni's performance operator has dependency on this script to work.

Comment 2 Steve Milner 2020-02-18 17:37:07 UTC
> 1) . /lib/dracut-lib.sh. I checked the initramfs the it should be  /usr/lib/dracut-lib.sh

Looks like it exists in both locations and is the same file in dracut. Checked via rd.break=mount:

```
mount:/# ls -la /lib/dracut-lib.sh /usr/lib/dracut-lib.sh 
-rwxr-xr-x 1 root root 34162 Jan  1  1970 /lib/dracut-lib.sh
-rwxr-xr-x 1 root root 34162 Jan  1  1970 /usr/lib/dracut-lib.sh
mount:/# sha256sum /lib/dracut-lib.sh /usr/lib/dracut-lib.sh
4fb4d22936741b4482709de33546b844aa51e773d3805b76b24302a2a964a453  /lib/dracut-lib.sh
4fb4d22936741b4482709de33546b844aa51e773d3805b76b24302a2a964a453  /usr/lib/dracut-lib.sh
mount:/#
```

Comment 3 jianzzha 2020-02-18 17:40:13 UTC
I see. Thanks for the quick turnaround. I didn't see the message in dmesg but that would be a lower priority.

Comment 6 Micah Abbott 2020-02-26 21:53:36 UTC
This is fixed in RHCOS 44.81.202002182030-0 and builds afterwards.

Comment 9 Michael Nguyen 2020-04-10 14:06:49 UTC
switch_root:/# ls -la /lib/ | grep dracut-lib
-rwxr-xr-x  1 root root 34162 Jan  1  1970 dracut-lib.sh
switch_root:/# ls -la /lib/dracut-lib.sh /usr/lib/dracut-lib.sh 
-rwxr-xr-x 1 root root 34162 Jan  1  1970 /lib/dracut-lib.sh
-rwxr-xr-x 1 root root 34162 Jan  1  1970 /usr/lib/dracut-lib.sh
switch_root:/# sha256sum /lib/dracut-lib.sh /usr/lib/dracut-lib.sh
4fb4d22936741b4482709de33546b844aa51e773d3805b76b24302a2a964a453  /lib/dracut-lib.sh
4fb4d22936741b4482709de33546b844aa51e773d3805b76b24302a2a964a453  /usr/lib/dracut-lib.sh


[core@localhost ~]$ dmesg | grep "tuned: "
[    2.344694] tuned: setting workqueue CPU mask to 3
[core@localhost ~]$ cat /proc/cmdline 
BOOT_IMAGE=(hd0,gpt1)/ostree/rhcos-b00a5f89d3d52ae6b91e31fb322b67f1eaf8a4077edfc7077e8db65e27033364/vmlinuz-4.18.0-147.5.1.el8_1.x86_64 rhcos.root=crypt_rootfs console=tty0 console=ttyS0,115200n8 ignition.platform.id=qemu rd.luks.options=discard ostree=/ostree/boot.0/rhcos/b00a5f89d3d52ae6b91e31fb322b67f1eaf8a4077edfc7077e8db65e27033364/0 tuned.non_isolcpus=3
[core@localhost ~]$ cat /sys/devices/virtual/workqueue/cpumask 
3
[core@localhost ~]$ rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
* ostree://530d1dc7bdeb1e975d1804daa90d4f460884c5b2229c20fc72759b22f56e65a9
                   Version: 44.81.202002182030-0 (2020-02-18T20:36:12Z)

  ostree://530d1dc7bdeb1e975d1804daa90d4f460884c5b2229c20fc72759b22f56e65a9
                   Version: 44.81.202002182030-0 (2020-02-18T20:36:12Z)


switch_root:/# ls -la /lib/dracut-lib.sh /usr/lib/dracut-lib.sh 
-rwxr-xr-x 1 root root 34162 Jan  1  1970 /lib/dracut-lib.sh
-rwxr-xr-x 1 root root 34162 Jan  1  1970 /usr/lib/dracut-lib.sh
switch_root:/# sha256sum /lib/dracut-lib.sh /usr/lib/dracut-lib.sh
4fb4d22936741b4482709de33546b844aa51e773d3805b76b24302a2a964a453  /lib/dracut-lib.sh
4fb4d22936741b4482709de33546b844aa51e773d3805b76b24302a2a964a453  /usr/lib/dracut-lib.sh

[core@localhost ~]$ sudo rpm-ostree kargs --append tuned.non_isolcpus=3
Staging deployment... done
Kernel arguments updated.
Run "systemctl reboot" to start a reboot
[core@localhost ~]$ sudo systemctl reboot

[core@localhost ~]$ dmesg | grep "tuned: "
[    3.956631] tuned: setting workqueue CPU mask to 3
[core@localhost ~]$ cat /proc/cmdline 
BOOT_IMAGE=(hd0,gpt1)/ostree/rhcos-9340f3694d233c5c8714a0b44dc36898afcc9fac82e3b0443b158b5a7530e4fb/vmlinuz-4.18.0-147.8.1.el8_1.x86_64 rhcos.root=crypt_rootfs console=tty0 console=ttyS0,115200n8 ignition.platform.id=qemu rd.luks.options=discard ostree=/ostree/boot.0/rhcos/9340f3694d233c5c8714a0b44dc36898afcc9fac82e3b0443b158b5a7530e4fb/0 tuned.non_isolcpus=3
[core@localhost ~]$ cat /sys/devices/virtual/workqueue/cpumask 
3
[core@localhost ~]$ rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
* ostree://7bd886ecd8139185fa54a8d60696ddf834a43cbe06afba9a31e10516cf9e361d
                   Version: 45.81.202004100627-0 (2020-04-10T06:33:06Z)

  ostree://7bd886ecd8139185fa54a8d60696ddf834a43cbe06afba9a31e10516cf9e361d
                   Version: 45.81.202004100627-0 (2020-04-10T06:33:06Z)

Comment 13 errata-xmlrpc 2020-07-13 17:15:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2409


Note You need to log in before you can comment on or make changes to this bug.