From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 29 22:09:25 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2074A1065693 for ; Thu, 29 Jul 2010 22:09:25 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0F88FC0C for ; Thu, 29 Jul 2010 22:09:24 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id BAA01097; Fri, 30 Jul 2010 01:09:19 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OebHz-0002Sb-GZ; Fri, 30 Jul 2010 01:09:19 +0300 Message-ID: <4C51FC0E.9050204@icyb.net.ua> Date: Fri, 30 Jul 2010 01:09:18 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100603) MIME-Version: 1.0 To: pebu3op@googlemail.com References: <382607918.1356296.1280433776963.JavaMail.root@vms170009.mailsrvcs.net> <4C51E198.8060800@icyb.net.ua> <201007292341.21123.pebu3op@googlemail.com> In-Reply-To: <201007292341.21123.pebu3op@googlemail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Sergey Babkin Subject: Re: coherence-problem on the mapped memory buffer X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 22:09:25 -0000 on 30/07/2010 00:41 Alexander Fiveg said the following: > Thanks a lot for your answers. But i am afraid i do not have enough > experience to solve these tasks. Could you please provide me with helpful > information how to: > - get access to the pages associated with a certain memory-buffer ? > I mean, I want to get the structures, that describe the page properties I > should change (for instance, in order to make the page non-cacheable). > > if you are aware of any good papers or examples in the system code, where > these topics are covered, I would appreciate it if you gave me the > references. I don't have a recipe, but some pointers to get you started: 1. investigate BUS_DMA_NOCACHE, see bus_dma(9) 2. check sys/dev/sound/pci/hda/hdac.c for HDAC_F_DMA_NOCACHE and comment about PCIe snoop - this might be relevenat 3. see pmap_change_attr for way to change caching type for a memory mapping 4. hope that more knowledgeable people (experts) provide their advice, keep nudging them via mailing list(s) :-) -- Andriy Gapon