From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752234AbdLDVCi (ORCPT ); Mon, 4 Dec 2017 16:02:38 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43548 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751701AbdLDVCg (ORCPT ); Mon, 4 Dec 2017 16:02:36 -0500 Date: Mon, 4 Dec 2017 22:02:28 +0100 From: Heiko Carstens To: Randy Dunlap Cc: LKML , X86 ML Subject: Re: maxcpus confusion References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 x-cbid: 17120421-0008-0000-0000-000004B3516E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17120421-0009-0000-0000-00001E4642DE Message-Id: <20171204210228.GA3286@osiris> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-04_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712040295 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 01, 2017 at 12:58:47PM -0800, Randy Dunlap wrote: > Hi, > > I used "maxcpus=1" on a recent x86 boot (4.15-rc1) and got 4 CPUs (all of > them AFAICT). When I use "nr_cpus=1", I do get a hard limit of one CPU. > > > A few boot log excerpts: > > [ 0.000000] smpboot: Allowing 8 CPUs, 4 hotplug CPUs > ... > [ 0.030007] smp: Bringing up secondary CPUs ... > [ 0.030109] smp: Brought up 1 node, 1 CPU > [ 0.030181] smpboot: Max logical packages: 4 > [ 0.030255] smpboot: Total of 1 processors activated (4789.06 BogoMIPS) > > > Is systemd (or something else) later onlining the other CPUs? > > /sys/devices/system/cpu/online is 0-3 > /sys/devices/system/cpu/offline is 4-7 Check /lib/udev/rules.d/ for a rule that auto-onlines CPUs. This behavior is distribution specific.