uma for acpi object cache

Andriy Gapon avg at FreeBSD.org
Fri Jan 25 08:36:55 UTC 2013


on 24/01/2013 22:33 Jung-uk Kim said the following:
> On 2013-01-24 13:49:07 -0500, Andriy Gapon wrote:
>> on 24/01/2013 20:29 Jung-uk Kim said the following:
>>> BTW, I tried something like that long ago.  In fact, the first
>>> attempt goes all the way back to this patch (warning: it's naive,
>>> broken, and overly complicated):
>>>
>>> http://people.freebsd.org/~jkim/acpica/OsdCache.diff
>>>
>>> I have more up-to-date and correct patch to use UMA but I'm still
>>> not 100% convinced whether we want to do it or not.
> 
>> Hmm, your patch looks a bit more complicated than mine. What is all
>> that extra stuff that you have there?
> 
> The main issue was AcpiOsPurgeCache().  For example, we didn't have
> anything like Linux's kmem_cache_shrink() at the time:
> 
> http://www.kernel.org/doc/htmldocs/kernel-api/API-kmem-cache-shrink.html
> 
> It seems you implemented that with zone_drain() but it wasn't
> available until this commit:
> 
> http://svnweb.freebsd.org/base?view=revision&revision=166213
> 
> Also, I had to make sure the cache is empty before we do
> uma_zdestroy(), so on and so forth.

OK, I see.  I don't think that any of that is really needed (now).
If you don't object I'll commit my variant in 1-2 weeks from now.

-- 
Andriy Gapon


More information about the freebsd-acpi mailing list