Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp262541pxx; Thu, 29 Oct 2020 01:53:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+uCH9WfkUw+VqS1iJ+E+v6NW3HjCwZjF0OKAxhh29Pa/Wh+Y2p+nkQbMAR8pdA1kSYfp2 X-Received: by 2002:a17:906:8157:: with SMTP id z23mr2907476ejw.274.1603961593040; Thu, 29 Oct 2020 01:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603961593; cv=none; d=google.com; s=arc-20160816; b=nHJLezp1AFZQ+jB649RftxcrjEtcrRecEcnVu9mcPd/blDIiKk7cWlJllEVpGRbDCz FoHHMhVtEl+z2ozQnFpqxf72LmIF9Wd8wlSLTuryrusO1/b91tp3u9NDngjYgBsPQMm6 9EEv3ikYIISfvbcFkgiHqDGD68VGSqyu/l/DRrO9nfYiNh8o9zl+Ip4jEI7J0sDceHi8 lfcLz3NO95GTlwwTewdAgBuQxtASn/0zimZ/RMu/pjuI/bEPtH/2ITFcqH87l8CNfZ3w OmjWG/UBvj7bBtnhFvDBVeSVr5J/Qp38QqmWW9kldvvyJ5iVGEH3V8GKDwYniqaIIt9n R1BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=IJ/1u3561E6mMIfNICLY2s/NugY/WQD7O6Mrlmn0Hsg=; b=p2JHDG45sSbB6tRsup1n9Xd4jPhGIoCbUQgykhb+nWFnTkU+G5nrl+Bm2386RWR+KQ 9lOkw2HAKK4J32rP7gFWEk71Tn/ksQkh52dt/qoX4EjOqP1RI38xrkWaqNPnsK50q/Hy 9wwfYMCqqYihngFOyXpIuGWoP2bB5o3LJls8eVI6yiKdh++iqAEVeEBkWkY65ptNqcIm 8DQ+7ftiM3z7X5PBDaJ4Fsn0PjOVvzGD8uNyXCygQwc6y1EUdUS5y/kvbvhDJkc2TCib +71GdSjVhy2WSFysu008zqfKhN0aTOsI5EmVACUgTuKRiMSBRfMJqB4DzFllS7iMIWHQ Eczg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si1335371ejo.13.2020.10.29.01.52.51; Thu, 29 Oct 2020 01:53:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387403AbgJ2CLs (ORCPT + 99 others); Wed, 28 Oct 2020 22:11:48 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:39660 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbgJ1Vgn (ORCPT ); Wed, 28 Oct 2020 17:36:43 -0400 Received: by mail-lf1-f68.google.com with SMTP id 184so673379lfd.6; Wed, 28 Oct 2020 14:36:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IJ/1u3561E6mMIfNICLY2s/NugY/WQD7O6Mrlmn0Hsg=; b=EDxqe/JRW7wHEr7E1J2zF5OK08poCt6hNmvLZ0LEvJoqmYzaZQOHCEtNYw5qRPV5VC yn/NBFEcRRwmsp19F+k0OuqO280SjFWFZGHHnkhKA+h69kRT2Uti45JAMoYq1Ho5sG/g 72fg4yyCpkmqBiM05SPOVGWz8ZWKUGcHCGQeqhghPo4dgAqjtHA1H4jX9gvzCtL06t5+ VvhjxC765mswwlye6mxlHTZAoVO17h+Gda7A0qEH0ENcr/d9OZRUeoFCCDBnR68c+vjM oa9XC0GuIBvJPh4ilpqfEKP0DDf5qXcwmYTKIpDBpPFqT4KnoFjHnn9wNfCVeeGkdpIB UQVw== X-Gm-Message-State: AOAM5315q6PCrFPkeEp20topQoAJ0MNx6L/RBqnfT+M9HmgkEovojE5W TGx5pZYfBEP4EEKJLccXNTe1wLZO0sD2NRe1PQSVOOyd X-Received: by 2002:ac2:5329:: with SMTP id f9mr2819996lfh.525.1603900518718; Wed, 28 Oct 2020 08:55:18 -0700 (PDT) MIME-Version: 1.0 References: <1603404243-5536-1-git-send-email-eberman@codeaurora.org> In-Reply-To: <1603404243-5536-1-git-send-email-eberman@codeaurora.org> From: Sudeep Holla Date: Wed, 28 Oct 2020 15:55:06 +0000 Message-ID: Subject: Re: [PATCH] smp: Add bootcpus parameter to boot subset of CPUs To: Elliot Berman Cc: Thomas Gleixner , Peter Zijlstra , "Paul E. McKenney" , Jonathan Corbet , Trilok Soni , Prasad Sodagudi , open list , linux-doc@vger.kernel.org, Sudeep Holla Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2020 at 7:24 AM Elliot Berman wrote: > > In a heterogeneous multiprocessor system, specifying the 'maxcpus' > parameter on kernel command line does not provide sufficient control > over which CPUs are brought online at kernel boot time, since CPUs may > have nonuniform performance characteristics. Thus, add bootcpus kernel > parameter to control which CPUs should be brought online during kernel > boot. When both maxcpus and bootcpus is set, the more restrictive of the > two are booted. > > Signed-off-by: Elliot Berman > --- > Documentation/admin-guide/kernel-parameters.txt | 8 +++++++ > include/linux/cpu.h | 2 +- > kernel/cpu.c | 4 ++-- > kernel/smp.c | 28 +++++++++++++++++++++++-- > 4 files changed, 37 insertions(+), 5 deletions(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index 65d047f..ea31af3 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -449,6 +449,14 @@ > > See Documentation/admin-guide/bootconfig.rst > > + bootcpus= [SMP] List of processors that an SMP kernel > + will bring up during bootup. Similar to maxcpus, except > + as a cpu list as described above. The more restrictive > + of maxcpus and bootcpus applies. If bootcpus=1-3 and > + maxcpus=2, only processors 1 and 2 are booted. As with > + maxcpus, you can bring up other plugged cpu by executing > + "echo 1 > /sys/devices/system/cpu/cpuX/online" > + There is a fundamental assumption here that the user of this cmdline understands how the logical cpu numbers are allocated for the physical cpus. Based on the discussion I understand that you want to boot specific physical cpus for whatever reasons and here you want to specify the logical cpu numbers for them. So NACK for that concept alone irrespective of whether this concept as a whole is acceptable or not. -- Regards, Sudeep