From owner-freebsd-arch@freebsd.org Tue Nov 14 04:36:55 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 59EFBCFF77E for ; Tue, 14 Nov 2017 04:36:55 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com [209.85.223.181]) (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 24BA76E1AD for ; Tue, 14 Nov 2017 04:36:54 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f181.google.com with SMTP id u42so5043844ioi.9 for ; Mon, 13 Nov 2017 20:36:54 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=MC4fwIe84JHOzz8sm5WGmxTK2MRwPnWz1xuQiiQzWG4=; b=jvzbXlNErJqqWb2K1eVNOoNIJ2M0eEutwSm7fDvahnTyyq+8R/q9RU4CiPTdGCKR2z MVn4sKjSKNCjR56bhvNVcz9BUrvWHbiRmxb3s556AXQyVIJI7K8z+o6PHA8aAj6t6hAY zKGX3qG10/aJ0Ergl76hdCLCaR650g1Unvsp9BSqyI4QCGQtJBkZiYHkJvhC/wsnASTK OLQAUi4hZ0Qj1G9pRiG+0VRstp1K2ckyPfn8OK0m+NQkDZRVC4uvaAuQ2jGR3jWmZGsL bXdWDe0kmmI1tzto9A4DkNr8LZ0TAHwQON7e9pdu46uggt3TcDtlLvfCcd/F7sMP59QO /d1g== X-Gm-Message-State: AJaThX5ofGn9ur+UBGAQYhUBX5DNj8DMvnSqbBVJ7yHJyrm54uheqz4J 7baQc9oZz5FA7RL4+KeBCr83qajM X-Google-Smtp-Source: AGs4zMa3OjeZva2o9rAh/Yg6EqA435wlNqBvtGtnd1lE/cHMFSKW/fjjngwN78zj0M1hjfb/Q6ls+g== X-Received: by 10.107.83.12 with SMTP id h12mr12621713iob.13.1510633739216; Mon, 13 Nov 2017 20:28:59 -0800 (PST) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com. [209.85.214.45]) by smtp.gmail.com with ESMTPSA id r4sm4955981itg.11.2017.11.13.20.28.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 20:28:58 -0800 (PST) Received: by mail-it0-f45.google.com with SMTP id 72so12123039itl.5 for ; Mon, 13 Nov 2017 20:28:58 -0800 (PST) X-Received: by 10.36.228.68 with SMTP id o65mr13882784ith.128.1510633738126; Mon, 13 Nov 2017 20:28:58 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.164.130 with HTTP; Mon, 13 Nov 2017 20:28:57 -0800 (PST) In-Reply-To: <20171114020138.GA18863@mcvoy.com> References: <20171114020138.GA18863@mcvoy.com> From: Conrad Meyer Date: Mon, 13 Nov 2017 20:28:57 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: small patch for numactl. Comments? To: Larry McVoy Cc: "freebsd-arch@freebsd.org" , scottl@netflix.com, kbowling@llnw.com, gallatin@netflix.com Content-Type: text/plain; charset="UTF-8" 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 04:36:55 -0000 Hi Larry, What if instead, the benchmark checked its own NUMA parameters? If a NUMA policy is not set, the benchmark can bail out with an admonishment. Best, Conrad On Mon, Nov 13, 2017 at 6: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 > +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"