From owner-freebsd-arch@freebsd.org Tue Jul 7 22:53:19 2015 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 89D29996AC6 for ; Tue, 7 Jul 2015 22:53:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) (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 52B85162D for ; Tue, 7 Jul 2015 22:53:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iebmu5 with SMTP id mu5so144248903ieb.1 for ; Tue, 07 Jul 2015 15:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=BRnnipCwY5jpJuADGfoG3Voa2uSOSF4NX7esZMWCTgw=; b=xpxsdZmHtStdxv/MyGIefhh4zxNUHEtpXdxhSur5pP8b5Ga+xMidKjZdyZJptmJkrq 3hndiEet1X9WFsdjSaZ+iEAZu3BlyxFLFUnO2DqmbCETPCGwvtCwvbwJ2fFxI3mBprcQ qXBJq82CPXMjKktYrckRCDBn6v6lnct6MDlYN00dNhyYLLAuqrt5ye9z4ZJwmK7Ae21V iZT01K6eRM1wo6ZGiAbV7R7yddlFDIvU19b2ZwDMCM5JC6ni9BywHeTICF0zXe0PnfNC YucghI5075VRzyRXtUzzgLrmXpES9n6OgdLmpYqT25J+SWWSj8jU8gKFZk+r+xhpEk4c z2vw== MIME-Version: 1.0 X-Received: by 10.107.5.1 with SMTP id 1mr10483875iof.88.1436309598669; Tue, 07 Jul 2015 15:53:18 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Tue, 7 Jul 2015 15:53:18 -0700 (PDT) In-Reply-To: <20150707093747.GE2080@kib.kiev.ua> References: <20150707093747.GE2080@kib.kiev.ua> Date: Tue, 7 Jul 2015 15:53:18 -0700 X-Google-Sender-Auth: lmbB_PhaYq5ajSWIxJdoTEurAb0 Message-ID: Subject: Re: CFT/CFR: NUMA policy branch From: Adrian Chadd To: Konstantin Belousov Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 22:53:19 -0000 On 7 July 2015 at 02:37, Konstantin Belousov wrote: > On Sun, Jul 05, 2015 at 07:06:27PM -0700, Adrian Chadd wrote: >> Hi, >> >> I've done another update. kib@ has been beating me with the clue stick a bit. >> >> https://github.com/freebsd/freebsd/compare/master...erikarn:local/adrian_numa_policy >> >> * (kib) (numactl.c) fix up sorting of include files >> * (kib) (numactl.c) consistent use of values when calling err() >> * (kib) (numactl.c) consistently wrap lines at 78 characters, don't >> prematurely wrap lines >> * (kib) don't use the old-style BSD licence mentioning "regents", use >> the updated one >> * (kib) (vm_domain.c) don't break out after iterating a few times and >> have the API be unpredictable - so now the API will always succeed in >> reading a vm_policy >> >> I've tested the policies (first-touch, fixed-domain, round-robin) and >> they all still work as advertised, both on threads and processes. >> >> I'd appreciate more reviews and some further testing. > > I did not found a fix for the wrong locking of seq_t. Which locking is wrong? * the global policy is locked via the global mutex; * the process/thread policy is locked via PROC_LOCK. What did I miss? > Am I reading sys_numa_getaffinity() right that it does copyout() while > owning the process lock ? I've fixed and push that, thanks. > The things are still syscalls instead of procctl() commands. I haven't done that yet. procctl() doesn't have a concept of per-TID operations at all, and it currently has a framework for iterating over things that this would have to slot into somehow. I'm open to suggestions on how you would integrate per-TID operations into procctl(). > I did not read further, the patch is half-done at best. That's lovely. Meanwhile, people are actively using this thing. -adrian