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(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
--
--
Regards
Qiao Nuohan