From owner-freebsd-amd64@FreeBSD.ORG Wed Nov 5 18:28:49 2014 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 957234DE; Wed, 5 Nov 2014 18:28:49 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 048B8386; Wed, 5 Nov 2014 18:28:48 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sA5ISfA5045716 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Nov 2014 20:28:42 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sA5ISfA5045716 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sA5ISfTD045715; Wed, 5 Nov 2014 20:28:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 5 Nov 2014 20:28:41 +0200 From: Konstantin Belousov To: Sourish Mazumder Subject: Re: memory type e820 Message-ID: <20141105182841.GJ53947@kib.kiev.ua> References: <201410301353.05185.jhb@freebsd.org> <3381641.WgZAz21Lfu@pippin.baldwin.cx> <20141104084628.GN53947@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-amd64@freebsd.org X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2014 18:28:49 -0000 On Wed, Nov 05, 2014 at 11:22:21PM +0530, Sourish Mazumder wrote: > Should there be any difference in performance while writing to a memory as > cached versus uncached mapping? Obviously, there should. On the other hand, I do not understand how this question is related to the discussion below. > > On Tue, Nov 4, 2014 at 2:16 PM, Konstantin Belousov > wrote: > > > On Mon, Nov 03, 2014 at 01:52:44PM -0500, John Baldwin wrote: > > > On Saturday 01 November 2014 18:55:53 Sourish Mazumder wrote: > > > > Hi John, > > > > > > > > I tried the pmap_mapdev() as suggested by you. Works perfectly. Thanks > > for > > > > the information. > > > > > > Sure. > > > > > > > What is required, If I want to add this nvram memory to VM pages? > > > > > > Hmm. If this is device memory you generally don't want that. I'm not > > > actually sure how to do this at runtime. If you don't mind having a > > local > > > hack you can add a change in the MD startup code (e.g. in hammer_time() > > > in sys/amd64/amd64/machdep.c) to adjust the ranges added to > > > phys_avail[] and dump_avail[]. > > > > The facility exists to do this. It is OBJT_MGTDEVICE pager and > > vm_phys_fictitious_reg_range(). This is used by i915 and TTM for > > aperture, and seems XEN dom0 code uses it for mapping pages from > > other domains into dom0. > > > > > > -- > Sourish Mazumder > 9986309755