From owner-svn-src-projects@FreeBSD.ORG Thu Jul 29 09:32:45 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75473106567B; Thu, 29 Jul 2010 09:32:45 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4C2EC8FC24; Thu, 29 Jul 2010 09:32:45 +0000 (UTC) Received: by pwj9 with SMTP id 9so38590pwj.13 for ; Thu, 29 Jul 2010 02:32:44 -0700 (PDT) Received: by 10.142.166.6 with SMTP id o6mr12855929wfe.256.1280394276974; Thu, 29 Jul 2010 02:04:36 -0700 (PDT) Received: from [10.0.1.198] (udp022762uds.hawaiiantel.net [72.234.79.107]) by mx.google.com with ESMTPS id q27sm729780wfc.6.2010.07.29.02.04.34 (version=SSLv3 cipher=RC4-MD5); Thu, 29 Jul 2010 02:04:35 -0700 (PDT) Date: Wed, 28 Jul 2010 23:05:19 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Alan Cox In-Reply-To: <4C50FB4A.4000505@cs.rice.edu> Message-ID: References: <201007290212.o6T2CN20099343@svn.freebsd.org> <4C50FB4A.4000505@cs.rice.edu> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-projects@freebsd.org, Jeff Roberson , src-committers@freebsd.org Subject: Re: svn commit: r210586 - projects/ofed/head/sys/ofed/include/linux X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 09:32:45 -0000 On Wed, 28 Jul 2010, Alan Cox wrote: > Jeff Roberson wrote: >> Author: jeff >> Date: Thu Jul 29 02:12:22 2010 >> New Revision: 210586 >> URL: http://svn.freebsd.org/changeset/base/210586 >> >> Log: >> - Refine various page allocation methods. They all essentially override >> the page object pointer to cache the virtual address after allocation. >> This same trick is used in UMA to store the slab address and so it >> should be safe. >> > > You needn't do this. The virtual address of a kernel_object or kmem_object > page is easily obtained: > > VM_MIN_KERNEL_ADDRESS + IDX_TO_OFF(m->pindex) Ah, of course. I hadn't considered that. Thanks. I'll remove the other hackery. On another note; linux guarantees multipage allocations are aligned on the first power of two size that satisfies the allocation. I can do this with contigmalloc but they also guarantee that the virtual address is similarly aligned. I don't think I've run across anything that requires it, but if I do, do we have any provision for allocating virtually aligned addresses? Thanks, Jeff > > > Regards, > Alan >