From: Jens Axboe <jens.axboe@oracle.com>
To: linux-btrace@vger.kernel.org
Subject: Re: [Patch] fix
Date: Mon, 23 Mar 2009 18:40:42 +0000 [thread overview]
Message-ID: <20090323184042.GX27476@kernel.dk> (raw)
In-Reply-To: <1237819991.5624.20.camel@kitka.ibm.com>
On Mon, Mar 23 2009, Martin Peschke wrote:
> Jens,
>
> Tom fixed my "boken trace magic" issue. Please apply.
Heh well, not sure I'd call that a real fix, but if it makes things,
that is fine. I'll apply it.
>
> Thanks,
> Martin
>
>
> From: Tom Zanussi <tzanussi@gmail.com>
>
> Blktrace failed to lock reader threads on the cpu used by the corresponding
> writer. This resulted in stale data being consumed when blktrace accidently
> read at a position that was being written to at the same time. This issue
> surfaced as "bad trace magic" warnings emitted by blktrace tools.
>
> The problem occured on an SMP System z machine. The patch fixes the issue.
>
> Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
>
> ---
> blktrace.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/blktrace.c
> +++ b/blktrace.c
> @@ -610,7 +610,7 @@ static int lock_on_cpu(int cpu)
>
> CPU_ZERO(&cpu_mask);
> CPU_SET(cpu, &cpu_mask);
> - if (sched_setaffinity(getpid(), sizeof(cpu_mask), &cpu_mask) < 0)
> + if (sched_setaffinity(0, sizeof(cpu_mask), &cpu_mask) < 0)
> return errno;
>
> return 0;
>
>
--
Jens Axboe
prev parent reply other threads:[~2009-03-23 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 14:53 [Patch] fix Martin Peschke
2009-03-23 18:40 ` Jens Axboe [this message]
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=20090323184042.GX27476@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).