Memory allocation in kernel -- what to use in which situation?
What is the best for page-sized allocations?
davide.italiano at gmail.com
Sun Oct 2 15:08:39 UTC 2011
On Sun, Oct 2, 2011 at 4:37 PM, Lev Serebryakov <lev at freebsd.org> wrote:
> Hello, Davide.
> You wrote 2 октября 2011 г., 18:00:26:
>>> BTW, I/O is often require big buffers, up to MAXPHYS (128KiB for
>>> now), do you mean, that any allocation of such memory has
>>> considerable performance penalties, especially on multi-core and
>>> multi-CPU systems?
>> In fact, the main client of such kind of allocations is the ZFS
>> filesystem (this is due to its mechanism of adaptative cache
>> replacement, ARC). Afaik, at the time in which UMA was written, such
>> kind of allocations you describe were so infrequent that no initial
>> effort was made in order to optimize them.
>> People tried to address this issue by having ZFS create a large number
>> of UMA zones for large allocations of different sizes. Unfortunately,
>> one of the side-effects of this approach was the growth of the
>> fragmentation, so we're investigating about.
> What about these geom modules, which allocate buffers, because need
> to read more, than requested by upper layer? geom_cache and
> geom_raid3, for example?
I wasn't aware about that, thanks a lot for pointing me out.
I'll surely look at them.
> And "my" geom_raid5 -- I begin to understand, why original author
> of geom_raid5 (which need MAXPHYS-sized buffers regularry) wrote its
> own memory management layer...
If you're interested in what we're doing, contact me or poke me on efnet.org.
> // Black Lion AKA Lev Serebryakov <lev at FreeBSD.org>
More information about the freebsd-hackers