From: Nikanth Karthikesan <knikanth@suse.de>
To: Zach Brown <zach.brown@oracle.com>
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: Tue, 1 Jul 2008 13:57:52 +0530 [thread overview]
Message-ID: <200807011357.52407.knikanth@suse.de> (raw)
In-Reply-To: <48692008.3010003@oracle.com>
On Monday 30 June 2008 23:33:52 Zach Brown wrote:
> 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.
>
Yes, this is unsafe. Thanks for the review.
Thanks
Nikanth Karthikesan
prev parent reply other threads:[~2008-07-01 8:23 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
2008-07-01 8:27 ` Nikanth Karthikesan [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=200807011357.52407.knikanth@suse.de \
--to=knikanth@suse.de \
--cc=bcrl@kvack.org \
--cc=jmoyer@redhat.com \
--cc=linux-aio@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zach.brown@oracle.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