From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752241AbdLDWkq (ORCPT ); Mon, 4 Dec 2017 17:40:46 -0500 Received: from merlin.infradead.org ([205.233.59.134]:55390 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbdLDWkp (ORCPT ); Mon, 4 Dec 2017 17:40:45 -0500 Subject: Re: maxcpus confusion To: Heiko Carstens Cc: LKML , X86 ML References: <20171204210228.GA3286@osiris> From: Randy Dunlap Message-ID: Date: Mon, 4 Dec 2017 14:40:43 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171204210228.GA3286@osiris> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/04/2017 01:02 PM, Heiko Carstens wrote: > 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. You got it in one try. Thanks. It would have taken me awhile to find that. I owe you a beer if you get to Portland, Oregon. :) -- ~Randy