From owner-freebsd-arch@freebsd.org Tue Nov 14 03:54:06 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 BEF1FCFE363 for ; Tue, 14 Nov 2017 03:54:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (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 8574D6CE11 for ; Tue, 14 Nov 2017 03:54:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id n134so8401788itg.1 for ; Mon, 13 Nov 2017 19:54:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=LkTh+Ji7A/09LWhQvoD7jPDSLM6dd6wqclKhhKrmfsU=; b=It9g3P0IHdWkgnfE2+cDo0i+yqw0UPdTco3nfmw2yuwPWfVCHgWlgOkEOQZUNnhM4j MYtnkj5fQxtq4a+hIUA7S8z2B/Qw1A6W5KIz41HI7t6PdUbVqwAbQqabqN9u740WFZn5 6vShno+zjkKkLnUrb89ACjYYO5pVbWZBxdQrMWzW1zlysh9s71TJqRFALeluxMchQMft rrsFTbmubkvV/GIJ+VLSMsFjUlhs/1+v/o9mqDJigRfoq/8r/u5VO7YY5Xh3NZADqwAm ngbTuX3CQCgFP84PTk4vp6+dlMk3LE+/1C8QLAmleKgfFU5Dxi73lodCv9hYTJyC9s4i 5J2w== 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=LkTh+Ji7A/09LWhQvoD7jPDSLM6dd6wqclKhhKrmfsU=; b=I0jNE2NMBbTe2KYQVokmH79BC/q3C9ha7Y8FAOwQUKxq05ag6XZq2NVv9ggnfRhCMu uKdV82/HTj3++QTHPohwCM1YqUjfpu6fEiZtibf+gybCjFhrul7m5d/ES97cux2ct5qx hC+8u9pG6SGG5Km6tOqgus1amUXayYQt3sYeHZrezDYL3Aeya69vh8x264PftJB/5/cg 9jPLLoUPmB8Y2KCF2Zm7h+ecggcjlfpudwuPy+M14cSfCKw2IWpCdgYGIyZjxaZApOUs iyiwWxF6wZxXsjVetDJCf1SNclV8M9U+CIyl3ef00L+Hbdob7VIlFXexeGIrRSWaw6gI bdMQ== X-Gm-Message-State: AJaThX7F5ge/xb+XhwIemicIzaEtIGbI/Id0VKheebSek6wkYrozzFCa vLyzjSIweVju3Vzo2XqocE+5S2I+pVw0KrcbbJ4L8w== X-Google-Smtp-Source: AGs4zMYoBiTrWurKMk23O8dCiSkk/eZaSJLpbBcH/ZjF3YbmMpG5B2EboEfphDzcZgutKmJksRZD3y4VK3F1MAXJv/U= X-Received: by 10.36.94.129 with SMTP id h123mr12124694itb.64.1510631645709; Mon, 13 Nov 2017 19:54:05 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Mon, 13 Nov 2017 19:54:05 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:e4fb:a5e7:1b7a:fc3a] In-Reply-To: <20171114020138.GA18863@mcvoy.com> References: <20171114020138.GA18863@mcvoy.com> From: Warner Losh Date: Mon, 13 Nov 2017 20:54:05 -0700 X-Google-Sender-Auth: yVK2ZPO2N9ftgF0ePi5wJoRUz2c Message-ID: Subject: Re: small patch for numactl. Comments? To: Larry McVoy Cc: "freebsd-arch@freebsd.org" , Scott Long , Kevin Bowling , Drew Gallatin Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 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 03:54:06 -0000 On Mon, Nov 13, 2017 at 7:01 PM, Larry McVoy wrote: > Hi folks, some CDN people are dragging me out of retirement to work > on FreeBSD. Which I have to say is sort of fun since I started my > kernel hacking on SunOS 4.x which was a very very nice version of > BSD. But FreeBSD has mostly caught up, so it's pleasant. > > 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 > run the benchmark via numactl (imma gonna blog about numa, it sucks > unless you are numa aware). > > I did some docs but I'm new to the FreeBSD man macros, would love > feedback on how to do that right. > > --- numactl.1 2017-11-13 17:51:26.243473000 -0800 > +++ numactl.1.lm 2017-11-13 17:51:20.494596000 -0800 > @@ -107,6 +107,15 @@ > .El > .Sh EXIT STATUS > .Ex -std > +.Sh ENVIRONMENT > +.Nm > +sets the environment variable > > +\fINUMACTL=YES\fP > .Va NUMACTL=YES The rest looks good... Warner +before running > +.Ar cmd ... > +so that programs that know that 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); > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" >