Bug 1271465 - 40-redhat.rules: unconditional onlining of new cpus breaks maxcpus=1 and causes problems for kdump
40-redhat.rules: unconditional onlining of new cpus breaks maxcpus=1 and caus...
Status: CLOSED DUPLICATE of bug 1266322
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.2
ppc64le Unspecified
unspecified Severity urgent
: rc
: ---
Assigned To: systemd-maint
qe-baseos-daemons
:
Depends On:
Blocks: 1270174
  Show dependency treegraph
 
Reported: 2015-10-14 01:36 EDT by David Gibson
Modified: 2016-08-03 06:55 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-14 01:44:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Gibson 2015-10-14 01:36:03 EDT
Description of problem:

The /usr/lib/udev/rules.d/40-redhat.rules included in the normal systemd package includes a rule which brings any offline CPUs online.

SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ENV{CPU_LEAVE_OFFLINE}!="yes", ATTR{online}="1"

It looks like this is intended so that newly hotplugged CPUs will be automatically activated.

However, if any CPUs are present, but offline at boot - such as when the maxcpus kernel command line option is used - then those CPUs will be brought online by udevd, which is not what a user would probably expect.

In particular, this means that kdump setups using maxcpus=1 end up with SMP enabled, which is a complexity we don't want for something supposed to be as simple and reliable as possible.


Version-Release number of selected component (if applicable):

systemd-219-19.el7.ppc64le

How reproducible:

100%


Steps to Reproduce:
1.  Boot up system, with maxcpus=1 on the command line
2.  Once booted, check /proc/cpuinfo

Actual results:

All present CPUs are online.

Expected results:

Only one CPU is online.


Additional info:

  * For kdump on x86, this is addressed by using "nr_cpus=1" instead of "maxcpus=1", which prevents more cpus being added later.  Complexities with cpu threading modes means that nr_cpus=NN doesn't work properly on Power (bug 1222059 has some more information).

 * An alternative approach specific to kdump would be to alter construction of the kdump initramfs to exclude this rule.  However, I can't see a straightforward way of doing that without excluding 40-redhat.rules entirely, which might have other rules which are important during a kdump.
Comment 1 David Gibson 2015-10-14 01:44:01 EDT

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

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