Received: by 10.213.65.68 with SMTP id h4csp1184451imn; Mon, 26 Mar 2018 02:29:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELtmrBO5Yk4DS0GNl0T7Uesp4J+pZ4hifiWz36PnzbHJmy/nMPF6wMV06y2P1Fa/nDmpMtVb X-Received: by 10.99.60.6 with SMTP id j6mr27114272pga.73.1522056582452; Mon, 26 Mar 2018 02:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522056582; cv=none; d=google.com; s=arc-20160816; b=cIft2l/cOpDcwyPVTHA9TFODQb8QHpi2zMtttUGqVOLXh9l9HQpuc7qhWL58I/DRt7 AopY+Pct+LBO2fE5qBBSFcu2ZpQOsC7DwmYBKP92/CKzAYKNpLAtfYQpLEdluMnmCh1Q 9p+gcn40+7fA6wyxrf2kLalujnBe/kWaMf06xPLyXFTe6iedBmwNpbPq+8IgFDkSUdMB CVbbXD7E/AbYRZwc+GtwEl7yGH4/2zrWQy1LPYSQD9ulYS05biFsBWllm6l31UjvW+ve s+uioinkjqTNdiQr418NH92u8qe6Vphc7tsUQkkgFMJGEUFNEJx4zgxt7sOD0emYAYJ8 RYjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=PGy6Nv+ze2g0ecTF6fvQt0IMvQXThamdNg/aZgJitUE=; b=WJhk1e+p9gAJqakuI1EmZxLyBfi1CFjXDqQOpvlReUA/3ysABFCC6QyxnhdjmGsWh2 fsdX5/Q3Jqi8p7x5OyrezyiHHhDwVonqioILotW74x3klCfnQzazV6MQ+iGNaRdw7XY4 Dm+3240jjWVYTQhBSBfb3tmJk6FoZdFiZy65OoPs5RWITD8kvsHKGsU1udfuVcxFi6Wi YCfoVJibPvFU09budEaZHsDtLZteWyNRr0Rx8Yrr4NyFgkz4bZwsF69wulRL1j/VKkwh i2gkTxcQS+0ZffXKlXfnCKgxbaiibrtpPTdqKqMng3/cUIlhZ42sPOMkb24xfp2xpSIA Ckog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=U/Tmy6P+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18-v6si2561732pll.294.2018.03.26.02.29.28; Mon, 26 Mar 2018 02:29:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=U/Tmy6P+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751090AbeCZJ2b (ORCPT + 99 others); Mon, 26 Mar 2018 05:28:31 -0400 Received: from mail-qt0-f180.google.com ([209.85.216.180]:42428 "EHLO mail-qt0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750955AbeCZJ2a (ORCPT ); Mon, 26 Mar 2018 05:28:30 -0400 Received: by mail-qt0-f180.google.com with SMTP id j3so7355773qtn.9 for ; Mon, 26 Mar 2018 02:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PGy6Nv+ze2g0ecTF6fvQt0IMvQXThamdNg/aZgJitUE=; b=U/Tmy6P+0Mrkk56q2wKUfeovCtsryJuAg1WPz0mZO26fXG40geSRVMrRjQd4GSOmPE yDAgDGwAIIiCo2PzkkO6VGHL7XrZ56H8MOXtZXtqqloBppM+ZRuGv/V4y9eCFd4vt2ih 7kT1rj9tLYGtRPXzhZpe7U7ihhXxBezOvs70zJEfFwQGAuyNh087r2A85dGMIATnPST7 4M9VFL3Dz36+AD6hFzFcTdnA7PX2QUDoezCyD8wYwmy4ITRPWk3L0eeVQLlTnHTYDAwe 6zxvdimH97GjnivEbAlGoBBjlrZhJkq4LCdU28dOI4XXbU+Mnhq0xMuQ+DYKvwA6tBvP BagQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PGy6Nv+ze2g0ecTF6fvQt0IMvQXThamdNg/aZgJitUE=; b=cEmzytmasECKXdo9jOERx1eHB4FMJHjywQdeCTrSeBp+s1aLdVXZPAwBAsuDxIxEc+ ohXFOn3XuIwq2IvNtumzdmE5p/zHBBvX2ZBI8EjxUdfRGOiGCtrrKCt4kN4ONjv9CHxa Q3AWawRONTFAzIbdejD1oUa3yDTtaOIdZjiLaHOH0mVmKG4XmAsgypeCKbqoYmj5K3SI ATddQ6ddIPqmcAjuD7wrNQDWs/RQwCd9mfft3j2SX+WVX+rx8Xmcjb6AAGbM13fpsFdf 7cHPio6RW8cJ7yxSAo3XwieqQGsrv4NQLwHAQOJa/Q/4QfXe0EtZLVWqSxcPK6v7gmgI IWLA== X-Gm-Message-State: AElRT7Fv9ihoz8rQ+Z+DbAT4QqPQv5PvBexd5Tp1OiTOMDGtZeRcfKnP TNWgAfksrJDRjOxFb1FqyP0hiKI/zr+HPPrnriUuGB1n X-Received: by 10.200.18.71 with SMTP id g7mr50264526qtj.35.1522056508986; Mon, 26 Mar 2018 02:28:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.25 with HTTP; Mon, 26 Mar 2018 02:28:28 -0700 (PDT) In-Reply-To: <20180326085214.GB5991@hc> References: <20180302143737.10788-1-jglauber@cavium.com> <20180302143737.10788-2-jglauber@cavium.com> <20180306140201.GB7428@hc> <20180326085214.GB5991@hc> From: Arnd Bergmann Date: Mon, 26 Mar 2018 11:28:28 +0200 X-Google-Sender-Auth: 53ibTPquF0Oh-7pv0TKoacuO2Nw Message-ID: Subject: Re: [PATCH 2/2] arm64: defconfig: Raise NR_CPUS to 256 To: Jan Glauber Cc: Catalin Marinas , Will Deacon , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 26, 2018 at 10:52 AM, Jan Glauber wrote: > On Tue, Mar 06, 2018 at 03:02:01PM +0100, Jan Glauber wrote: >> On Tue, Mar 06, 2018 at 02:12:29PM +0100, Arnd Bergmann wrote: >> > On Fri, Mar 2, 2018 at 3:37 PM, Jan Glauber wrote: >> > > ThunderX1 dual socket has 96 CPUs and ThunderX2 has 224 CPUs. >> > >> > Are you sure about those numbers? From my counting, I would have expected >> > twice that number in both cases: 48 cores, 2 chips and 2x SMT for ThunderX >> > vs 52 Cores, 2 chips and 4x SMT for ThunderX2. >> >> That's what I have on those machines. I counted SMT as normal CPUs as it >> doesn't make a difference for the config. I've not seen SMT on ThunderX. >> >> The ThunderX2 number of 224 is already with 4x SMT (and 2 chips) but >> there may be other versions planned that I'm not aware of. >> >> > > Therefore raise the default number of CPUs from 64 to 256 >> > > by adding an arm64 specific option to override the generic default. >> > >> > Regardless of what the correct numbers for your chips are, I'd like >> > to hear some other opinions on how high we should raise that default >> > limit, both in arch/arm64/Kconfig and in the defconfig file. >> > >> > As I remember it, there is a noticeable cost for taking the limit beyond >> > BITS_PER_LONG, both in terms of memory consumption and also >> > runtime performance (copying and comparing CPU masks). >> >> OK, that explains the default. My unverified assumption is that >> increasing the CPU masks wont be a noticable performance hit. >> >> Also, I don't think that anyone who wants performance will use >> defconfig. All server distributions would bump up the NR_CPUS anyway >> and really small systems will probably need to tune the config >> anyway. >> >> For me defconfig should produce a usable system, not with every last >> driver configured but with all the basics like CPUs, networking, etc. >> fully present. >> >> > I'm sure someone will keep coming up with even larger configurations >> > in the future, so we should try to decide how far we can take the >> > defaults for the moment without impacting users of the smallest >> > systems. Alternatively, you could add some measurements that >> > show how much memory and CPU time is used up on a typical >> > configuration for a small system (4 cores, no SMT, 512 MB RAM). >> > If that's low enough, we could just do it anyway. >> >> OK, I'll take a look. > > I've made some measurements on a 4 core board (Cavium 81xx) with > NR_CPUS set to 64 or 256: > > - vmlinux grows by 0.04 % with 256 CPUs Ok. Is this both with CONFIG_CPUMASK_OFFSTACK=n? > - Kernel compile time was a bit faster with 256 CPUS (which does > not make sense, but at least is seems to not suffer from the change). Do you mean compiling the same kernel configuration while running on a system with less than 64 CPUs on either a CONFIG_NR_CPUS=64 or CONFIG_NR_PCUS=256 kernel, or do you mean the time to compile a kernel with either CONFIG_NR_CPUS=64 or CONFIG_NR_CPUS=256, while running on the same host? I assume the former, which is a very interesting result, possibly pointing to us doing something wrong in the NR_CPUS=64 case that could be optimized. If you ran with CONFIG_CPUMASK_OFFSTACK, that may have made a significant difference, but I would expect it to be faster without it. To get more insight to what is happening, you could rerun the same test with 'perf record' and then compare the profiles. How significant is the runtime difference compared to the jitter you get between normal runs on the same configuration? > Is there a benchmark that will be better suited? Maybe even a > microbenchmark that will suffer from the longer cpumasks? Good question. > - Available memory decreased by 0.13% (restricted memory to 512 MB), > BSS increased 5.3 % 0.13% of a few hundred megabytes is still several hundred kb, right? I'd like to hear some other opinions on that, but it seems to be in the range of enabling many additional device drivers, which is something we don't do lightly. Arnd