public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <compudj@krystal.dyndns.org>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Jens Axboe <jens.axboe@oracle.com>,
	Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>,
	Tom Zanussi <tzanussi@gmail.com>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	righi.andrea@gmail.com
Subject: Re: [PATCH 2/3] relay: Fix race condition which occurs when reading across CPUs.
Date: Mon, 16 Jun 2008 14:23:27 -0400	[thread overview]
Message-ID: <20080616182327.GA31477@Krystal> (raw)
In-Reply-To: <84144f020806161118n70a876aeyb5ccac7b1e21d842@mail.gmail.com>

* Pekka Enberg (penberg@cs.helsinki.fi) wrote:
> Hi Jens,
> 
> On Mon, Jun 16 2008, Eduard - Gabriel Munteanu wrote:
> >> In any case, if we use relay in a hot path, we are doing debugging, so
> >> a couple of atomic operations won't be a big problem. Along with
> >> setting affinity, this shouldn't be a problem.
> 
> On Mon, Jun 16, 2008 at 7:46 PM, Jens Axboe <jens.axboe@oracle.com> wrote:
> > Ehm no, that is a completely false claim. Relay speed does matter, a
> > great deal. We rely heavily on eg blktrace being as ligt weight as
> > possible to capture millions of events in a very short time frame
> > without impacting performance too much. Relay is NOT just for debugging.
> >
> > So I completely agree with Mathieu here, and I'm not a big fan of the
> > proposed solution.
> 
> OK, so we just document that fact that you're not supposed to read
> from different CPU and be done with that? Or do you have any
> alternative fix in mind?
> 

ltt-relay.c in the LTTng project implements its own buffering scheme on
top of relay buffers. It does not have such limitation. Actually, it
does not need to disable interrupts. It uses atomic counters and cmpxchg
atomic ops to manage concurrency. You might want to have a look at it.

Mathieu


-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  reply	other threads:[~2008-06-16 18:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13  1:09 [PATCH 2/3] relay: Fix race condition which occurs when reading across CPUs Eduard - Gabriel Munteanu
2008-06-14  4:26 ` Tom Zanussi
2008-06-14 15:11   ` Eduard - Gabriel Munteanu
2008-06-14 16:16     ` Pekka Enberg
2008-06-16  5:38       ` Tom Zanussi
2008-06-16  6:19         ` Pekka Enberg
2008-06-17  4:52           ` Tom Zanussi
2008-06-16 12:22     ` Mathieu Desnoyers
2008-06-16 13:22       ` Eduard - Gabriel Munteanu
2008-06-16 16:46         ` Jens Axboe
2008-06-16 18:18           ` Pekka Enberg
2008-06-16 18:23             ` Mathieu Desnoyers [this message]
2008-06-16 18:28             ` Jens Axboe
2008-06-17 12:39               ` Eduard - Gabriel Munteanu
2008-06-17 12:49                 ` Eduard - Gabriel Munteanu
2008-06-17 13:10                   ` Mathieu Desnoyers
2008-06-17 13:35                     ` Eduard - Gabriel Munteanu
2008-06-17 13:50                       ` Mathieu Desnoyers
2008-06-17 14:55                         ` Eduard - Gabriel Munteanu
2008-06-17 12:55                 ` Mathieu Desnoyers
2008-06-17 13:21                   ` Eduard - Gabriel Munteanu
  -- strict thread matches above, loose matches on Subject: below --
2008-06-12 20:26 Eduard - Gabriel Munteanu
2008-06-12 22:58 ` Andrea Righi
2008-06-12 23:15   ` Eduard - Gabriel Munteanu

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=20080616182327.GA31477@Krystal \
    --to=compudj@krystal.dyndns.org \
    --cc=akpm@linux-foundation.org \
    --cc=eduard.munteanu@linux360.ro \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=righi.andrea@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox