Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Sep 2012 09:28:33 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-arm@freebsd.org, freebsd-mips@freebsd.org
Subject:   Re: busdma buffer management enhancements - call for review and test
Message-ID:  <1346858913.59094.76.camel@revolution.hippie.lan>
In-Reply-To: <CAJ-VmonCguhTxNqW2qeCPAOnGn8e_73p6mwZThdrCSmfw9TCfg@mail.gmail.com>
References:  <1346777897.1140.633.camel@revolution.hippie.lan> <CAJ-VmonnaPE=6SVvc1hDE2URAY9TSWkMXOwa7F4X2knBQgbxNw@mail.gmail.com> <1346803062.59094.27.camel@revolution.hippie.lan> <CAJ-VmonCguhTxNqW2qeCPAOnGn8e_73p6mwZThdrCSmfw9TCfg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2012-09-04 at 20:06 -0700, Adrian Chadd wrote:
> I just want to make sure that you don't assume individual memory
> access costs are the same regardless of how big the allocations are.
> 
> Ie, if you have a bunch of scattered L1-sized allocations, versus them
> all being nearby in the same 512/1024 byte page; the underlying memory
> architecture may be doing memory transactions at a slightly larger
> size than your L1 assumption.
> 
> Damn these hierarchicial memory systems.

I think nothing about my code significantly changes the current
situation in this regard.  Right now bus_dmamem_alloc() gets small
chunks of memory from malloc(9), which means they come from a set of
power-of-two-sized uma zones.  With my changes the memory comes from a
similar set of 2^N sized uma zones, but they're segregated from the
zones used by malloc(9) so that memory in a single cache line never
contains data for both DMA and non-DMA (or two unrelated DMA) users at
once.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1346858913.59094.76.camel>