From owner-freebsd-arch@FreeBSD.ORG Fri Feb 20 20:16:25 2015 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B29A51A5; Fri, 20 Feb 2015 20:16:25 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8747F198; Fri, 20 Feb 2015 20:16:25 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 14720B915; Fri, 20 Feb 2015 15:16:24 -0500 (EST) From: John Baldwin To: "K. Macy" Subject: Re: getting NUMA into the tree (userland most interesting for me) Date: Fri, 20 Feb 2015 15:14:28 -0500 Message-ID: <2069208.rjIe3PXOHb@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <20150219041012.GJ1953@funkthat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 20 Feb 2015 15:16:24 -0500 (EST) Cc: Alan Cox , Adrian Chadd , Konstantin Belousov , John-Mark Gurney , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 20:16:25 -0000 On Friday, February 20, 2015 12:17:09 AM K. Macy wrote: > >>> Yes, I think we have a fair bit to do in the kernel before we are in a > >>> position to export anything truly useful to userland unfortunately. The > >>> last time I talked with Jeff about projects/numa (after the first draft > >>> of the wiki page) I came away with the impression that there might be > >>> some things we can pull out of that branch, but that it isn't suitable > >>> for merging upstream directly. Jeff noted that he and Alan had gone > >>> through several iterations of this already (I believe at least 3 > >>> completely different policy designs) all of which had their own issues. > >>> > >>> Outside of the VM I think that we can keep the APIs somewhat stable by > >>> having this opaque policy cookie to pass around that we can redefine > >>> the guts of later. However, various parts of the VM all have to handle > >>> whatever the policy defines, and while the vm_phys bits and > >>> contigmalloc() might be kind of obvious to implement, higher level VM > >>> layers like kmem() and malloc() are more complicated. One thing that > >>> is in projects/numa is changes for UMA that we can hopefully reuse much > >>> of, but I don't recall how much (if any) of kmem/malloc is in there. > >>> Also, while vm_phys is one of the first things to do, I know that Alan > >>> and Jeff have pending patches to remove the cache queue (since it is > >>> far less useful than it seems) which simplify vm_phys making it easier > >>> to implement NUMA policies there, so I'm hoping we can get that in > >>> sooner before having to start tearing up the VM too much. This is why > >>> the stuff I currently have is targeted non-VM bits like interrupts as > >>> getting that correct is lower-hanging fruit that might provide some > >>> gains regardless. Even once vm_phys is done I think the first thing to > >>> tackle next is contigmalloc to facilitate static bus_dma allocations > >>> (descriptor rings and such) being local to a device. > >> > >> Contigmalloc improvements and cache queue removal are in the > >> phabricator queue now. They are also prerequisites for per-cpu free > >> page caches which are a huge scalability improvement for some > >> workloads such as Netflix's. > >> > >> There is still a fair amount of scalability work (including Jeffr's > >> per-domain pagedaemon work) that really needs to happens before we can > >> seriously think about a general user-level NUMA interface. > > > > Is there anything wrong with maybe bringing over the basic low level > > allocator changes from projects/numa so the basics are there? > > I think they're probably predicated on the work that is being > shepherded in now. Even if not, it would require someone to shepherd > it in and the corresponding spare cycles from alc to review / revise / > repeat - which seem to be in short supply. Can you add entries for these to the wiki page with links to the phab reviews? I know there is an entry for the page cache queue removal already, but you could add one for contigmalloc right next to it. -- John Baldwin