From owner-freebsd-current@freebsd.org Thu Sep 12 15:54:36 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7889FD24E7 for ; Thu, 12 Sep 2019 15:54:36 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46Tjy34mWXz4QXv for ; Thu, 12 Sep 2019 15:54:35 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd2f.google.com with SMTP id j4so55895793iog.11 for ; Thu, 12 Sep 2019 08:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UjayjPjs2x6sLHh4cI8QCU2bPWZJMuQjTyXQA7vJvW8=; b=p954PMDk1ETBqhRprS9GP6j9fZ3GlIE2aMR+0RmphN/q4wz6+diJXJW9ps9EYZyjm2 OGGSXzXILzf32YUce4CF6ZXA+QsJeLLQHRUWq5kDpeSvPvTG1OAvrwd6OCsys19CWX9V WZRsWVIaNJVrUTCvxQ0vJmYWv9iaJD2oBPopa3kN3sRt7hfORkxdYce3d6IWO+L6sYhM LlC2eQF77M1IKut9ES5p2l11jdFb8rLqUkuQZapWxLB9u4RmUoQrq5KWdHYcf9PrKvrP RcBaGoZXVQKezfsdJlWNIoGQPRFJlVRpj/vHwycO99oa6QSJdTZnzHr1NyvzPJ3W8tD+ Y0XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=UjayjPjs2x6sLHh4cI8QCU2bPWZJMuQjTyXQA7vJvW8=; b=FqpXQneCo1GqVf+SxkW4xIwica7uxVYkKC5bXThz5Ovd2Z/En+Rht6b4aacbBAmJ/H 9QD5Dz5HSnALjnAUM+TRyDgly390wfzy4U0Otq6xgbffLAe114Zci7kh+NpOO8ZlD89Q Mbmdnz1Un8KDlh9iLnmkHZZ2ljjIXd6gOEhFjgBu9JPzjZ9PDucrH0I/Wv9nkGGzPZUV Ux6LcWPFhaD9ei2O3U2x+eegH/CToADOU0nIYw5HmsebSvy9TGU0ln9EHL3ScxpGwJup LGbJ2S1FO7HIXHnTTkqBEUEsfY3+SD/sc5b07km8bXtyNl7u/zBZ+XeKEouiEHMU/0Hc y36A== X-Gm-Message-State: APjAAAVebRfydLbTpPBIe2ZdKdndaradc0Zpl/gM7aTcKpehwX7EHe/3 ARVqQ+t1wcMZ3/pT/Acbp9U5yngo X-Google-Smtp-Source: APXvYqycYrXQtuPCB45KUaw2Dp5P7+tOMgzcSndDr4+D+J+RmJ38ql8I2YN7zKo1NZ6mkfTsyNTGIA== X-Received: by 2002:a05:6602:2256:: with SMTP id o22mr2311350ioo.104.1568303674164; Thu, 12 Sep 2019 08:54:34 -0700 (PDT) Received: from raichu (toroon0560w-lp140-01-69-159-39-167.dsl.bell.ca. [69.159.39.167]) by smtp.gmail.com with ESMTPSA id y19sm23423476ioq.69.2019.09.12.08.54.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2019 08:54:33 -0700 (PDT) Sender: Mark Johnston Date: Thu, 12 Sep 2019 11:54:28 -0400 From: Mark Johnston To: Mark Millard Cc: FreeBSD Current Subject: Re: "cpuset -n prefer:?" --what values for "?" are supposed to be allowed? (only 1 is, despite two numa domains) Message-ID: <20190912155428.GA8397@raichu> References: <20190911143125.GA17992@raichu> <99BB5653-1F42-4309-9892-24029FD02E39@yahoo.com> <20190911151512.GB17992@raichu> <3CE4AEB7-E32C-49BD-8C75-71AB8739BAEC@yahoo.com> <54F53CA8-6BEC-4B31-9662-C6854CDE0A08@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54F53CA8-6BEC-4B31-9662-C6854CDE0A08@yahoo.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Rspamd-Queue-Id: 46Tjy34mWXz4QXv X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=p954PMDk; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::d2f as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-3.92 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; FREEMAIL_TO(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-2.22)[ip: (-6.09), ipnet: 2607:f8b0::/32(-2.71), asn: 15169(-2.25), country: US(-0.05)]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; SUBJECT_HAS_QUESTION(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[f.2.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 15:54:36 -0000 On Wed, Sep 11, 2019 at 11:14:42AM -0700, Mark Millard wrote: > > > On 2019-Sep-11, at 10:11, Mark Millard wrote: > > > > > On 2019-Sep-11, at 08:15, Mark Johnston wrote: > > > >> On Wed, Sep 11, 2019 at 07:57:26AM -0700, Mark Millard wrote: > >>> > >>> > >>> On 2019-Sep-11, at 07:31, Mark Johnston wrote: > >>> > >>>> On Tue, Sep 10, 2019 at 10:58:05PM -0700, Mark Millard wrote: > >>>>> In a context with: > >>>>> > >>>>> # cpuset -g > >>>>> pid -1 mask: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 > >>>>> pid -1 domain policy: first-touch mask: 0, 1 > >>>>> > >>>>> I get: > >>>>> > >>>>> # cpuset -l0 -n prefer:0 COMMAND > >>>>> cpuset: setdomain: Invalid argument > >>>>> > >>>>> # cpuset -l0 -n prefer:2 COMMAND > >>>>> cpuset: setdomain: Invalid argument > >>>>> > >>>>> But one prefer:? value does allow the COMMAND > >>>>> to run: > >>>>> > >>>>> # cpuset -l0 -n prefer:1 COMMAND > >>>>> > >>>>> This seem odd to me. Am I missing something? > >>>>> > >>>>> For reference: I'm using a ThreadRipper 1950X > >>>>> with a head -r351227 based context for this > >>>>> activity. The above happens to have been run > >>>>> in a Windows 10 Pro HyperV session, instead > >>>>> of in a native-boot of the same media. (A > >>>>> native-boot would have had 32 CPUs.) > >>>> > >>>> Can you please show the output of "sysctl vm.phys_segs" from this > >>>> setup? > >>> > >>> Sure: > >> > >> I was wondering if you had only one domain populated, but it seems not > >> to be the case. Could you try updating to r351672 or later and see if > >> the behaviour persists? > > > > It may be a bit before I do that. > > > > FYI: I had set MAXMEMDOM to match the number of > > actual domains for the context: > > > > /usr/src/sys/amd64/conf/GENERIC-DBG:options MAXMEMDOM=2 > > /usr/src/sys/amd64/conf/GENERIC-NODBG:options MAXMEMDOM=2 > > > > (These kernel configuration files include GENERIC.) Ok, that helps. I believe you are hitting a bug that will be fixed by r351672 and a couple of preceding commits to the same area. > Not that the below is the problem that I reported, but > cpuset_modify_domain has an oddity. In the below, note > the "root->" use followed by the "root &&" test: the > root-> use would have failed first. Should the && be > "dset &&" instead? Should "root &&" just be removed for > being redundant? Good catch. I believe cpusets are not allowed to have a NULL domain set, so dset should never be NULL either.