All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: David Ahern <dsahern@gmail.com>
Cc: Andrew Jones <drjones@redhat.com>,
	linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl,
	paulus@samba.org, mingo@redhat.com, tzanussi@gmail.com
Subject: Re: perf script: rwtop: SIGALRM and pipe read race
Date: Mon, 17 Sep 2012 09:02:11 -0700	[thread overview]
Message-ID: <20120917160211.GC31375@ghostprotocols.net> (raw)
In-Reply-To: <50573EC3.6020209@gmail.com>

Em Mon, Sep 17, 2012 at 09:16:19AM -0600, David Ahern escreveu:
> On 9/17/12 8:55 AM, David Ahern wrote:
> >2. the rwtop.pl script is not handling negative return values ($ret < 0)
> >properly -- the '$ret > 0' check is succeeding even though $ret is
> >negative (e.g., -EAGAIN) leading to astronomical read values
> 
> I think perl is treating $ret as an unsigned integer.
> 
> Again, I know little about perl, but this change to
> ./scripts/perl/rwtop.pl makes it behave properly:
> 
>     my $n = sprintf("%d", $ret);
> 
>     if ($n > 0) {
>     ...

I think what you figured out makes sense, its the best we have and you
found it to get it back working, could you please send the two patches
properly signed-off, etc?

If Andrew could please test the patchset so that I could add his
Tested-by, that would be great,

Thanks,

- Arnaldo

  reply	other threads:[~2012-09-17 16:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 15:39 perf script: rwtop: SIGALRM and pipe read race Andrew Jones
2012-09-14 16:05 ` David Ahern
2012-09-14 18:10   ` Andrew Jones
2012-09-17 14:55     ` David Ahern
2012-09-17 15:16       ` David Ahern
2012-09-17 16:02         ` Arnaldo Carvalho de Melo [this message]
2012-09-17 16:32           ` David Ahern
2012-09-17 17:12             ` Arnaldo Carvalho de Melo
2012-09-17 20:10               ` David Ahern
2012-09-18  9:05       ` Andrew Jones
2012-09-18  9:30         ` Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120917160211.GC31375@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=drjones@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=tzanussi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.