From nobody Thu Sep 22 05:15:21 2022 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MY3QV4H4Mz4cN1M for ; Thu, 22 Sep 2022 05:15:46 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MY3QT5gV5z3Ql0 for ; Thu, 22 Sep 2022 05:15:45 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-il1-x136.google.com with SMTP id y9so4319367ily.11 for ; Wed, 21 Sep 2022 22:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=4lxgVTAu3DCsuOndmoHUrWXcFOlS0AJlzuFex/yxojI=; b=kNmOb+YxFY4lmZ18OfjG2j1e1t+cNKIN3hxONJYk7DT5SqSi66wZsuU8GLdCLPecSH mu3fBGMEQKLlh8tRevSypnAQ2ULK4U5sOW47AaWDQz1z5e5PFglnjImFFyuCXV/E94d0 ApANTQBT1+EU1T1RfVwNO/UPHlHHB2sTriN912HFaTq6tgkAC8BGAu+tb19kHatEuaHy +WTW9q4OpZcZFkhrcLaZMWDiVsBhLwZC6ZQp+jmLYeXZMj0/SZ3kMpuDYq4L08CY4gUs e9ouC52P3jxfUPMuLy6uteuUhMd3nrorsGCVrYY8UObXy30ZdZEl5dwXTeVM02jWrh5a rLsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=4lxgVTAu3DCsuOndmoHUrWXcFOlS0AJlzuFex/yxojI=; b=rYUS+Q3sU7XDA24lGydvp7efN4EzS+vy8B2nj5qOv2fyuBfR4tl5nQiiMOs41BT9Pu r8NGB3u4DOMkfh5rBtqxYWEaiTZ/SEFzTbmcuLgt7Vumxw15O1GdszNhMEbXjxS2MR+z oyxbWbQ/Qvqb0SKTB1T7dnYpHe6VeuKkJ1E5Ua34SIYzFP7kE4kAwnkG/T2F+tPmGFwF 7Gt1CfCHeCx2DEh8kjvMsmYxiaSnqnuyrrUQgkio30WKib+ph8g+o0zX79KbVYIjnmQq jTGrQWWWagx4VSTcjnU0ow5YCL9iGtuzXi20+ifMCUNX511C92qINGt/Gk8nEEbgB9na opQw== X-Gm-Message-State: ACrzQf3VMggBtcb7pKf9YJMlIidWeHmpjkWNRN9CM5znLPX+YMdlXqiB +hZ2oVmxSlSrBBn8LxDVEXkzvnXLvgMJ4tc5lSCjVjb8spY= X-Google-Smtp-Source: AMsMyM6/FqAKD/eVy6sv5rbCxDYwH4Y4Vqzu+THO1NL3YtdFM7ozpYZekFLtrNIkhVrPiQ2od5WSQJ/2vw6e1tuejug= X-Received: by 2002:a05:6e02:2189:b0:2f1:92d4:6b22 with SMTP id j9-20020a056e02218900b002f192d46b22mr750591ila.210.1663823744270; Wed, 21 Sep 2022 22:15:44 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Kevin Oberman Date: Wed, 21 Sep 2022 22:15:21 -0700 Message-ID: Subject: Re: Disabling CPUs To: Paul Procacci Cc: "freebsd-questions@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000003f06b105e93d27a7" X-Rspamd-Queue-Id: 4MY3QT5gV5z3Ql0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=kNmOb+Yx; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of kob6558@gmail.com designates 2607:f8b0:4864:20::136 as permitted sender) smtp.mailfrom=kob6558@gmail.com X-Spamd-Result: default: False [-2.79 / 15.00]; NEURAL_HAM_LONG(-0.95)[-0.954]; NEURAL_HAM_SHORT(-0.77)[-0.765]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_MEDIUM(-0.37)[-0.371]; FORGED_SENDER(0.30)[rkoberman@gmail.com,kob6558@gmail.com]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::136:from]; MLMMJ_DEST(0.00)[questions@freebsd.org]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_NEQ_ENVFROM(0.00)[rkoberman@gmail.com,kob6558@gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[gmail.com:+]; FREEMAIL_TO(0.00)[gmail.com]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000003f06b105e93d27a7 Content-Type: text/plain; charset="UTF-8" On Wed, Sep 21, 2022 at 7:26 PM Paul Procacci wrote: > (Resending with list included) > > Hey Keith, > > Taken from smp(4): > > FreeBSD allows specific CPUs on a multi-processor system to be > disabled. > This can be done using the hint.lapic.X.disabled tunable, where X is > the > APIC ID of a CPU. Setting this tunable to 1 will result in the > corresponding CPU being disabled. > > smp(4) further describes how to detect CPU topologies and whatnot. > Specifically the following sysctl seems useful: kern.sched.topology_spec > > Though I'm not entirely sure, I'd personally start with the above. > > ~Paul > > On Wed, Sep 21, 2022 at 10:06 PM Kevin Oberman > wrote: > >> I am looking to disable all 8 E-cores on my Alder Lake system to prevent >> repeated crashes. The man page has an example of this: >> Modify the cpuset all threads are in by default to contain only the first >> 4 CPUs, leaving the rest idle: >> cpuset -l 0-3 -s 1 >> I did this, but in subsequent port build, all 12 "CPUs" were running at >> 100%. Am I missing something? Maybe use -p 1" instead of "-s 1". >> >> I also found suggestions to use "hint.lapic.N.disabled", but teh lines >> that were supposed to be in dmesg and the messages log were not present. I >> am baffled, but really need to do something to stop the crashes currently >> impacting Alder Lake systems. >> -- >> Kevin Oberman, Part time kid herder and retired Network Engineer >> E-mail: rkoberman@gmail.com >> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 >> > > > -- > __________________ > > :(){ :|:& };: > Nothing looks useful in kern.sched. I am wondering if SCHED_4BSD is impacting this. My knowledge of the schedulers is minimal, but 4BSD provided much better responsiveness than ULE.I 've been running 4BSD on my systems (excluding servers) for over a decade... Probably much longer. I may try building a kernel with ULE and see what effect that has. # sysctl kern.sched kern.sched.runq_fuzz: 1 kern.sched.ipiwakeup.useloop: 0 kern.sched.ipiwakeup.usemask: 1 kern.sched.ipiwakeup.delivered: 26954287 kern.sched.ipiwakeup.requested: 26899799 kern.sched.ipiwakeup.enabled: 1 kern.sched.slice: 12 kern.sched.quantum: 94488 kern.sched.name: 4BSD kern.sched.preemption: 1 kern.sched.cpusetsize: 32 - Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --0000000000003f06b105e93d27a7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Sep 21, 2022 at 7:26 PM= Paul Procacci <pprocacci@gmail.c= om> wrote:
(Resending with list included)

Hey Keith,

<= div>Taken from smp(4):

=C2=A0 =C2=A0=C2=A0 FreeBSD allows= specific CPUs on a multi-processor system to be disabled.
=C2=A0 =C2=A0= =C2=A0This can be done using the hint.lapic.X.disabled tunable, where X is= the
=C2=A0 =C2=A0 =C2=A0APIC ID of a CPU.=C2=A0 Setting this tunable to= 1 will result in the
=C2=A0 =C2=A0 =C2=A0corresponding CPU being disabl= ed.

smp(4) further describes how to detect CPU topologies= and whatnot.
Specifically the following sysctl seems useful:= kern.sched.topology_spec

Though I'm not e= ntirely sure, I'd personally start with the above.

~Paul

= On Wed, Sep 21, 2022 at 10:06 PM Kevin Oberman <rkoberman@gmail.com> wrote:
I am looking to disa= ble all 8 E-cores on my Alder Lake system to prevent repeated crashes. The = man page has an example of this:
Modify the cpuset all threads are in by default to = contain only the first 4 CPUs, leaving the rest idle:
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0cpuset -l 0-3 -s 1
I did this, but in subsequent port build,= all 12 "CPUs" were running at 100%. Am I missing something? Mayb= e use -p 1" instead of "-s 1".

I also found suggestions to use "hint= .lapic.N.disabled", but teh lines that were supposed to be in dmesg an= d the messages log were not present. I am baffled, but really need to do so= mething to stop the crashes currently impacting Alder Lake systems.
--
Kevin Oberman, Part time kid herder and r= etired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03= FB98AFA78E3B78C1694B318AB39EF1B055683


--
__________= ________

:(){ :|:& };:



Not= hing looks useful in kern.sched. I am wondering if SCHED_4BSD is impacting = this. My knowledge of the schedulers is minimal, but 4BSD provided much bet= ter responsiveness than ULE.I 've been running 4BSD on my systems (excl= uding servers) for over a decade... Probably much longer. I may try buildin= g a kernel with ULE and see what effect that has.

# sysctl kern.sched
ker= n.sched.runq_fuzz: 1
kern.sched.ipiwakeup.useloop: 0
kern.sched.ipiwa= keup.usemask: 1
kern.sched.ipiwakeup.delivered: 26954287
kern.sched.i= piwakeup.requested: 26899799
kern.sched.ipiwakeup.enabled: 1
kern.sch= ed.slice: 12
kern.sched.quantum: 94488
kern.sched.name: 4BSD
kern.sched.preemption: 1
kern.sched.cp= usetsize: 32
-
= Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail:= rkoberman@gmail.c= om
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055= 683
--0000000000003f06b105e93d27a7--