[Crash-utility] [PATCH] improve the performance of kmem -s [address]

qiaonuohan qiaonuohan at cn.fujitsu.com
Fri Feb 3 06:49:24 UTC 2012


At 2012-2-3 2:53, Dave Anderson wrote:
>
>
> ----- Original Message -----
>>
>> That all being said, your patch does have merit -- presuming that
>> the meminfo.cache field *never* gets set elsewhere prior to entering
>> the dump_kmem_cache_xxx functions.  I haven't taken the time to
>> verify that -- did you absolutely verify that?
>
> It looks OK to use "if (si->cache)" in those 3 locations -- but it
> would be safer to create/set a unique meminfo->flags bit for this
> feature.
Thanks for your comments.

A new flag called "CACHE_SET" is created to inform the 
dump_kmem_cache_xxx functions that "si->cache" has been set.

As you said in the previous mail, I agree that ~150000 individual slabs 
rarely exist in a real-life scenario. However, ~150000 individual slabs 
are used to illustrate the improvement clearly. Think about the 
situation that I install a big module with some kmem_caches. I need to 
check the state of each kmem_cache related to my module once some 
operations are done. So the times of execution of "kmem -s <addr>" may 
be even big. Time, obviouly, will be saved with my patch in such situation.
>
> Dave
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>
>


-- 
--
Regards
Qiao Nuohan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-kmem_s_addr.patch
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120203/339bdd45/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-kmem_s_addr.patch
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120203/339bdd45/attachment-0001.ksh>


More information about the Crash-utility mailing list