All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zach Brown <zach.brown@oracle.com>
To: Nikanth Karthikesan <knikanth@suse.de>
Cc: linux-aio@kvack.org, linux-kernel@vger.kernel.org,
	Benjamin LaHaise <bcrl@kvack.org>, Jeff Moyer <jmoyer@redhat.com>
Subject: Re: [PATCH] aio: use cmpxchg in aio_read_evt() instead of aio_ring_info->ring_lock
Date: Mon, 30 Jun 2008 11:03:52 -0700	[thread overview]
Message-ID: <48692008.3010003@oracle.com> (raw)
In-Reply-To: <200806260932.53563.knikanth@suse.de>

Nikanth Karthikesan wrote:
> Use cmpxchg in aio_read_evt() and remove the aio_ring_info->ring_lock

I don't think this is safe because the cmpxhg() can't differentiate the
0 it read at one point with a 0 that it reads in the future after other
racing threads have done enough work on the ring index to wrap it.

- z

  reply	other threads:[~2008-06-30 18:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-26  4:02 [PATCH] aio: use cmpxchg in aio_read_evt() instead of aio_ring_info->ring_lock Nikanth Karthikesan
2008-06-30 18:03 ` Zach Brown [this message]
2008-07-01  8:27   ` Nikanth Karthikesan

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=48692008.3010003@oracle.com \
    --to=zach.brown@oracle.com \
    --cc=bcrl@kvack.org \
    --cc=jmoyer@redhat.com \
    --cc=knikanth@suse.de \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@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.