From owner-freebsd-current@FreeBSD.ORG Thu Jul 12 23:20:27 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1EE31065674; Thu, 12 Jul 2012 23:20:27 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 51DE88FC1A; Thu, 12 Jul 2012 23:20:27 +0000 (UTC) Received: from server.rulingia.com (c220-239-248-69.belrs5.nsw.optusnet.com.au [220.239.248.69]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q6CNKJgW074156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Jul 2012 09:20:19 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q6CNKDda019463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Jul 2012 09:20:13 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q6CNKDa8019453; Fri, 13 Jul 2012 09:20:13 +1000 (EST) (envelope-from peter) Date: Fri, 13 Jul 2012 09:20:13 +1000 From: Peter Jeremy To: John Baldwin Message-ID: <20120712232013.GA34754@server.rulingia.com> References: <201207121040.27116.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <201207121040.27116.jhb@freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: scottl@freebsd.org, current@freebsd.org Subject: Re: Adding support for WC (write-combining) memory to bus_dma X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 23:20:27 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jul-12 10:40:27 -0400, John Baldwin wrote: >contigmalloc(). In fact, even better is to call kmem_alloc_contig() direc= tly >rather than using contigmalloc(). =2E.. >Peter, this is somewhat orthognal (but related) to your bus_dma patch whic= h is >what prompted me to post this. Overall, the change seems good to me. My sole thought on the API was whether the actual attribute should be passed, rather than having a couple of new BUS_DMA_ flags but you've addressed that in a followup. One change is that previously allocated memory was all charged to M_DEVBUF via the malloc_type_allocated() call in contigmalloc() whereas now only small allocations are counted. This would seem to indicate that large bus_dmamem_alloc() allocations won't be visible in (eg) "vmstat -m". --=20 Peter Jeremy --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk//W60ACgkQ/opHv/APuIdr6QCdHk7mMLXvzlKh6fBfaNi9q5sn pEkAnR/oKgGStC/HYMpkBBlx3bO2Fj4B =DKsp -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--