On 2022/12/26 16:08, lijiang wrote: >> Isn't this better? If no NR_SLAB_RECLAIMABLE, there is no need to >> search for NR_SLAB_UNRECLAIMABLE. >> >> > Originally, I had the same idea as you. But later, I noticed that there > was too much duplication of code. So, eventually I used the current fix. > > But anyway, if you would prefer the following change, It's also good to me. ok, it doesn't look too redundant to me :) and the following corresponds to the kernel change logically and can avoid an unnecessary call on 5.9 and later. will change and merge later. Thanks, Kazu > > Thanks > Lianbo > > --- a/memory.c >> +++ b/memory.c >> @@ -8457,6 +8457,11 @@ dump_kmeminfo(void) >> get_slabs = nr_slab; >> if (dump_vm_stat("NR_SLAB_UNRECLAIMABLE", >> &nr_slab, 0)) >> get_slabs += nr_slab; >> + } else if (dump_vm_stat("NR_SLAB_RECLAIMABLE_B", &nr_slab, >> 0)) { >> + /* 5.9 and later */ >> + get_slabs = nr_slab; >> + if (dump_vm_stat("NR_SLAB_UNRECLAIMABLE_B", >> &nr_slab, 0)) >> + get_slabs += nr_slab; >> } >> } >> >> Thanks, >> Kazu >> >> -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility Contribution Guidelines: https://github.com/crash-utility/crash/wiki