All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: linux-btrace@vger.kernel.org
Subject: Re: [PATCH] blkparse: Globally track smallest sequence read
Date: Mon, 08 Dec 2008 18:59:53 +0000	[thread overview]
Message-ID: <20081208185953.GM23742@kernel.dk> (raw)
In-Reply-To: <20081208153727.GN14520@bolzano.suse.de>

On Mon, Dec 08 2008, Jan Blunck wrote:
> When running
> 
>  blktrace -d /dev/sda -o - | ./blkparse -i -
> 
> Only a few traces are actually dumped to stdout. Most of the traces are
> stored up and printed only after hitting ^C by forcing show_entries_rb() to
> print them out. I noticed that once pci->smallest_seq_read is zero
> check_sequence always returns 1:
> 
> static int check_sequence(struct per_dev_info *pdi, struct trace *t, int
>         force)
> {
>         ...
> 
>         if (expected_sequence < pci->smallest_seq_read) {
>                 __t = trace_rb_find_last(pdi, pci, expected_sequence);
>                 if (!__t)
>                         goto skip;
> 
>                 __put_trace_last(pdi, __t);
>                 return 0;
>         } else if (!force) {
>                 return 1;
> 
>        ...
> }
> 
> Here is a patch to fix this. It uses a global variable to keep track of the
> smallest sequence read yet on any cpu.

Shouldn't this be stored in the per-device info - IOW, the smallest
sequence read yet on this device on any CPU?

-- 
Jens Axboe


  reply	other threads:[~2008-12-08 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 15:37 [PATCH] blkparse: Globally track smallest sequence read Jan Blunck
2008-12-08 18:59 ` Jens Axboe [this message]
2008-12-08 21:50 ` Jan Blunck

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=20081208185953.GM23742@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=linux-btrace@vger.kernel.org \
    /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.