From owner-freebsd-questions@FreeBSD.ORG Thu Apr 9 23:04:09 2015 Return-Path: Delivered-To: freebsd-questions@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 922EC93F for ; Thu, 9 Apr 2015 23:04:09 +0000 (UTC) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id 64906B72 for ; Thu, 9 Apr 2015 23:04:09 +0000 (UTC) Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.41]) by be-well.ilk.org (Postfix) with ESMTP id 129E533C1E; Thu, 9 Apr 2015 19:04:03 -0400 (EDT) Received: by lowell-desk.lan (Postfix, from userid 1147) id 357FA39822; Thu, 9 Apr 2015 19:04:01 -0400 (EDT) From: Lowell Gilbert To: Pierre-Yves =?iso-8859-1?Q?P=E9neau?= Subject: Re: How FreeBSD manage more than 4GB on 32 bits architecture References: <5526408F.1090005@asim.lip6.fr> <20150409114941.692910293a8120de4dafd400@yahoo.es> <20150409114906.6dd4379c@archlinux> <55264DC5.9070606@asim.lip6.fr> <55267A63.4040503@qeng-ho.org> <55269509.1080103@asim.lip6.fr> Reply-To: freebsd-questions@freebsd.org Date: Thu, 09 Apr 2015 19:04:01 -0400 In-Reply-To: <55269509.1080103@asim.lip6.fr> ("Pierre-Yves =?iso-8859-1?Q?P=E9neau=22's?= message of "Thu, 09 Apr 2015 17:04:41 +0200") Message-ID: <447ftkoqe6.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 23:04:09 -0000 Pierre-Yves P=E9neau writes: > I did not want give too much details in my first email to avoid > confusion, but this is exactly what I bring.. So let's be more clear :-) > > I'm working on an European project called TSAR(*). This project aims to > create a TeraScale ARchitecture with low consumption. That's why 32 bits > processors were chosen. > Our architecture is cc-NUMA. We have 256 clusters (maximum). Each > cluster contains 4 processors and have 4GB of RAM. MMUs can translate 32 > bits virtual addresses into 40 bits physical addresses using two > coordinates, which are used to identify each cluster. These coordinates > are on 4 bits, each. So, a physical address is build like this: > > | X coord(4 bits) | Y coord (4 bits) | Vaddr (32 bits) | > > That's how we obtain 40 bits of addressable space, and why we have 1TB > of physical memory. > > So, I've the required hardware I think. My problem is to find out how > FreeBSD can use this mechanisms. But I'm realizing that it may be not a > kernel issue, because it's an hardware functionality which should works > with Linux too. Right ? That is a bit of an oversimplification. The quote that led you to make your original post indicates a problem with the Linux mapping model which would not apply to using FreeBSD on your architecture. That's relatively minor, though. Your architecture has its own page table design, which makes sense to me on its own, but I don't have a sense of how much space the page table itself will take up. Obviously a page table for 1TB of 4KB pages is already too big for a 32-bit address space, even before you try mapping in the actual pages. So the page sizes will clearly average out much larger. My guess would be that the key design issue for you will be how your project's page table model fits into the interface of each OS's VM system. I can't give much advice in that area, though -- I tend to deal with embedded systems, which have entirely separate sets of challenges. Best wishes.