From owner-freebsd-arch@freebsd.org Tue Nov 14 14:08:08 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 7790EDBFCB9 for ; Tue, 14 Nov 2017 14:08:08 +0000 (UTC) (envelope-from lm@mcvoy.com) Received: from mcvoy.com (mcvoy.com [192.169.23.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69CBF7FEA2 for ; Tue, 14 Nov 2017 14:08:08 +0000 (UTC) (envelope-from lm@mcvoy.com) Received: by mcvoy.com (Postfix, from userid 3546) id CCAD735E130; Tue, 14 Nov 2017 06:08:07 -0800 (PST) Date: Tue, 14 Nov 2017 06:08:07 -0800 From: Larry McVoy To: Ravi Pokala Cc: Larry McVoy , freebsd-arch@freebsd.org, scottl@netflix.com, kbowling@llnw.com, gallatin@netflix.com Subject: Re: small patch for numactl. Comments? Message-ID: <20171114140807.GD21209@mcvoy.com> References: <20171114020138.GA18863@mcvoy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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 14:08:08 -0000 Hokay, took the suggestions, new patch for you. --- numactl.1 2017-11-13 17:51:26.243473000 -0800 +++ numactl.1.lm 2017-11-14 06:03:30.564340000 -0800 @@ -107,6 +107,15 @@ .El .Sh EXIT STATUS .Ex -std +.Sh ENVIRONMENT +.Nm +sets the environment variable +.Va NUMACTL=YES +before running +.Ar cmd ... +so programs that know they need to be run under +.Nm +can check. .Sh EXAMPLES Create a .Pa /bin/sh --- numactl.c 2017-11-13 16:18:36.134359000 -0800 +++ numactl.c.lm 2017-11-13 16:18:28.530953000 -0800 @@ -231,6 +231,7 @@ (void) set_numa_domain_cpuaffinity(cpu_domain, CPU_WHICH_PID, -1); + putenv("NUMACTL=YES"); errno = 0; execvp(*argv, argv); err(errno == ENOENT ? 127 : 126, "%s", *argv);