From owner-freebsd-arch@freebsd.org Tue Nov 14 18:07:21 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 900DADD99DC for ; Tue, 14 Nov 2017 18:07:21 +0000 (UTC) (envelope-from scottl@netflix.com) Received: from mail-pg0-x230.google.com (mail-pg0-x230.google.com [IPv6:2607:f8b0:400e:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6DC68F03 for ; Tue, 14 Nov 2017 18:07:21 +0000 (UTC) (envelope-from scottl@netflix.com) Received: by mail-pg0-x230.google.com with SMTP id 70so3444973pgf.6 for ; Tue, 14 Nov 2017 10:07:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=dBz/1vL3wwa0PgxHd0vIO8z8cLuytjC6ImMt58myxPU=; b=SohmB9RjQTQDczDukZWEud6cc+lcOkaSAiHfeD805QhnLCSCyg+PT1Ud2XrkKMdOfh qRmaBPDK3Pkb3cSe5GQbWLPYzHW6gK6nZeCGsUTrzkxVmHTucUlZo80b/tvyd6/kYltD XG9MjdejG4sqcBPyP3kss+Xpp1CURzYBPVzhAUidT9Yz5FNVLNp0/P9mWPMqhh7qi+LT F0BsSi9eRvH04qp2+SSaeIYqv8m/qqoaqH4b7X3QbMW+gPxkTsfZvYW+fora4t4XwDnf wQVB58XX7Yyv8QgneIA0q3veDyCSG8/c2p524wlMI1LL3TegViBpZjXUDbJMHdcy6vxU NG8w== X-Gm-Message-State: AJaThX5hLPNChjakiZlj99pwe7wFkRuSwLYDoty+FS8t6EBUfu/nZP+N T0gA95zbzitXSWvQsk1iOCELyQ== X-Google-Smtp-Source: AGs4zMb9higHu+pizZ7bVsXK0HjXPDrMtq4o7mIiqVvlTMRJAXCe/2l5ezrG2QZiku3BR7S9WnyfAA== X-Received: by 10.98.192.7 with SMTP id x7mr14790945pff.142.1510682840402; Tue, 14 Nov 2017 10:07:20 -0800 (PST) Received: from ?IPv6:2607:fb10:7021:1::ba51? ([2607:fb10:7021:1::ba51]) by smtp.gmail.com with ESMTPSA id h29sm42751962pfd.65.2017.11.14.10.07.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2017 10:07:19 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: small patch for numactl. Comments? From: Scott Long In-Reply-To: <20171114172134.GD6265@mcvoy.com> Date: Tue, 14 Nov 2017 11:07:18 -0700 Cc: Mateusz Guzik , freebsd-arch@freebsd.org, Kevin Bowling , gallatin@netflix.com Content-Transfer-Encoding: quoted-printable Message-Id: References: <20171114020138.GA18863@mcvoy.com> <20171114171032.ez6pxk3yrlczplvi@mguzik> <20171114172134.GD6265@mcvoy.com> To: Larry McVoy X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 18:07:21 -0000 > On Nov 14, 2017, at 10:21 AM, Larry McVoy wrote: >=20 > On Tue, Nov 14, 2017 at 06:10:34PM +0100, Mateusz Guzik wrote: >>> I'm wacking LMbench to be numa aware and this patch would help me = make >>> sure that when you are a numa machine you could insist that people=20= >>> run the benchmark via numactl (imma gonna blog about numa, it sucks >>> unless you are numa aware). >>>=20 >>=20 >> Well, I think the right thing to do is to query the existing policy = and >> complain when it turns out nothing is set. Perhaps exit by default = and >> add a switch to proceed anyway. >=20 > As already stated, that means #ifdef-ing portable code. Not a fan of = that. >=20 > I believe someone already approved env var approach anyway. FWIW, communicating state via environment variables is not a common = pattern in the core FreeBSD userland tools. It=E2=80=99s a bit more common in the = contributed tools. That=E2=80=99s probably why people are wishy-washy about your proposal. = That said, there=E2=80=99s no architectural rule against what you=E2=80=99re = proposing, it=E2=80=99s useful, and it=E2=80=99s not invasive and needing long discussion. Scott