[Crash-utility] Negative NR_WRITEBACK counter

Don Slutz dslutz at verizon.com
Thu Jul 10 18:54:20 UTC 2014


On 07/09/14 15:03, Buland Kumar Singh wrote:
> Hello Everyone,
>
> I am analysing a kernel crash dump (vmcore) captured from RHEL-5
> kernel version (2.6.18-371.4.1.el5) and found that the value of
> "NR_WRITEBACK" counter is negative (-126).
>
>


> As we're running a 64 bit kernel and the counters are signed long,
> so this is very unlikely to be a counter overflow. I need pointers
> and suggestions to determine the *cause* of negative counter from
> vmcore.
>
> Additional Information:
>
> $ git show ce866b34ae1b7f1ce60234cf65855886ac7e7d30
> [..]
> diff --git a/drivers/base/node.c b/drivers/base/node.c
> index 6fed520..a7b3dcb 100644
> --- a/drivers/base/node.c
> +++ b/drivers/base/node.c
> @@ -49,9 +49,6 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
>         get_page_state_node(&ps, nid);
>         __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid));
>
> -       /* Check for negative values in these approximate counters */
> -       if ((long)ps.nr_writeback < 0)
> -               ps.nr_writeback = 0;

Not that I know anything about this.  But based on the comment that you are
deleting, it is stated that this is an approximate counter.  I.E. to me that says
that this counter is allowed to be incorrect.  Negative is just part of the incorrect values.
The code you are deleting looks to be a fixup because the caller of node_read_meminfo()
(or later in this function) will not "do the right thing" if the number is negative.  So removing
this correction is bad.

     -Don Slutz

>
>         n = sprintf(buf, "\n"
>                        "Node %d MemTotal:     %8lu kB\n"
> [..]
>
> Thank you !
>
> -- 
> BKS
>
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20140710/02d0fffb/attachment.htm>


More information about the Crash-utility mailing list