Date: Sun, 2 Oct 2011 17:08:37 +0200 From: Davide Italiano <davide.italiano@gmail.com> To: lev@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Re: Memory allocation in kernel -- what to use in which situation? What is the best for page-sized allocations? Message-ID: <CACYV=-EDL%2BWYN9dJ=S1Hc96MfjCC0BQMgsioF6K1BbuCiXVNAQ@mail.gmail.com> In-Reply-To: <16010671866.20111002183758@serebryakov.spb.ru> References: <358651269.20111002162109@serebryakov.spb.ru> <CACYV=-FNM-3fcYzFGc9eFajdoBmG1E-rWo6tq-OwBefGPADywA@mail.gmail.com> <1393358703.20111002174545@serebryakov.spb.ru> <CACYV=-EA4nG2MG73hBitgtoRQEk8d2CzwzzAf%2BbceHcqOJHuiw@mail.gmail.com> <16010671866.20111002183758@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 2, 2011 at 4:37 PM, Lev Serebryakov <lev@freebsd.org> wrote: > Hello, Davide. > You wrote 2 =D0=BE=D0=BA=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2011 =D0=B3., 18:0= 0:26: > >>> =C2=A0BTW, I/O is often require big buffers, up to MAXPHYS (128KiB for >>> =C2=A0now), do you mean, that any allocation of such memory has >>> =C2=A0considerable performance penalties, especially on multi-core and >>> =C2=A0multi-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. > =C2=A0 What about these geom modules, which allocate buffers, because nee= d > =C2=A0to read more, than requested by upper layer? geom_cache and > =C2=A0geom_raid3, for example? I wasn't aware about that, thanks a lot for pointing me out. I'll surely look at them. > =C2=A0 And "my" geom_raid5 -- I begin to understand, why original author > =C2=A0of geom_raid5 (which need MAXPHYS-sized buffers regularry) wrote it= s > =C2=A0own memory management layer... > If you're interested in what we're doing, contact me or poke me on efnet.or= g. > -- > // Black Lion AKA Lev Serebryakov <lev@FreeBSD.org> > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACYV=-EDL%2BWYN9dJ=S1Hc96MfjCC0BQMgsioF6K1BbuCiXVNAQ>