Memory allocation in kernel -- what to use in which situation?
What is the best for page-sized allocations?
Lev Serebryakov
lev at FreeBSD.org
Sun Oct 2 14:38:11 UTC 2011
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?
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...
--
// Black Lion AKA Lev Serebryakov <lev at FreeBSD.org>
More information about the freebsd-hackers
mailing list