Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2014 11:19:05 +0800 (CST)
From:      btw@mail.ustc.edu.cn
To:        "Konstantin Belousov" <kostikbel@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re:  Re: What's the difference between kmem_arena and kernel_arena?
Message-ID:  <5002061.890581411355945170.JavaMail.coremail@mailweb>
In-Reply-To: <20140921200401.GL2210@kib.kiev.ua>
References:  <20140921200401.GL2210@kib.kiev.ua> <1473289.768021411196850376.JavaMail.coremail@mailweb>

next in thread | previous in thread | raw e-mail | index | archive | help
I got it! Thank you so much! ;-)

-twb

> -----Original E-mail-----
> From: "Konstantin Belousov" <kostikbel@gmail.com>
> Sent Time: 2014-9-22 4:04:01
> To: btw@mail.ustc.edu.cn
> Cc: freebsd-hackers@freebsd.org
> Subject: Re: What's the difference between kmem_arena and kernel_arena?
> 
> On Sat, Sep 20, 2014 at 03:07:30PM +0800, btw@mail.ustc.edu.cn wrote:
> > Hi All,
> > 
> > There are two similar variables declared in vm/vm_kern.h, they are kernel_arena
> > and kmem_arena. Both of them are used in kmem_malloc():
> > 
> >         rv = kmem_back((vmem == kmem_arena) ? kmem_object : kernel_object,
> > 
> > I'm wondering what's the difference between them. Why both of them are needed?
> > I have done a lot of searching, but I still can not find an answer.
> 
> Look at their usage.
> 
> kmem_arena is used for the kernel malloc() and page-sized uma allocations.
> kernel_arena is used by miscellaneous other kernel needs, e.g. for
> kernel stacks of threads, as the backing for kva_alloc() etc.




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