[Crash-utility] [PATCH] fix vmstat handling

vinayak menon vinayakm.list at gmail.com
Mon Nov 6 13:32:04 UTC 2017


Hi Dave,

On Fri, Nov 3, 2017 at 11:32 PM, Dave Anderson <anderson at redhat.com> wrote:
>
>
> ----- Original Message -----
>> On Thu, Nov 2, 2017 at 8:58 PM, Dave Anderson <anderson at redhat.com> wrote:
>> >
>> >
>> > ----- Original Message -----
>> >> From: Vinayak Menon <vinayakm.list at gmail.com>
>> >>
>> >> With kernels where LRUs are moved to node and thus vm_stat is
>> >> split into zone and node, crash utility fails to show the vmstat with
>> >> "kmem
>> >> -V", and the "CACHED" of kmem -i is shown as zero.
>> >>
>> >> Signed-off-by: Vinayak Menon <vinayakm.list at gmail.com>
>> >
>> > Nice -- thanks for catching this!
>> >
>> > But can you re-send the patch as an attachment?  It appears that the
>> > inlined patch below has all tabs replaced with spaces:
>> >
>> Sure. Attached.
>
> Hi Vinayak,
>
> I understand that this kernel change was introduced in 4.8, and
> I don't have a lot of 4.8 and later kernels to test with.
>
> But of the ones I do have, the 4.8, 4.13 and 4.14 kernels tested OK,
> but both of my 4.11.0-based kernels show the same type of bogus
> CACHED values:
>
>
> Can you take a look at what happened in those dumpfiles?  I'm
> guessing there's some negative number involved somewhere.
>
That turned out to be a different issue. swapper_space_nrpages was going wrong.
After the following kernel change, the swap cache address space is
split into many.

commit 4b3ef9daa4fc0bba742a79faecb17fdaaead083b
Author: Huang, Ying <ying.huang at intel.com>
Date:   Wed Feb 22 15:45:26 2017 -0800

    mm/swap: split swap cache into 64MB trunks

I have fixed it with the attached patch and with the 2 vmcores you had
provided it looks okay.

Thanks,
Vinayak
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-swapcache-calculation.patch
Type: application/octet-stream
Size: 2236 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20171106/254d54b9/attachment.obj>


More information about the Crash-utility mailing list