Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763189AbYF3SET (ORCPT ); Mon, 30 Jun 2008 14:04:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763312AbYF3SDx (ORCPT ); Mon, 30 Jun 2008 14:03:53 -0400 Received: from tetsuo.zabbo.net ([207.173.201.20]:45319 "EHLO tetsuo.zabbo.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763307AbYF3SDx (ORCPT ); Mon, 30 Jun 2008 14:03:53 -0400 Message-ID: <48692008.3010003@oracle.com> Date: Mon, 30 Jun 2008 11:03:52 -0700 From: Zach Brown User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Nikanth Karthikesan CC: linux-aio@kvack.org, linux-kernel@vger.kernel.org, Benjamin LaHaise , Jeff Moyer Subject: Re: [PATCH] aio: use cmpxchg in aio_read_evt() instead of aio_ring_info->ring_lock References: <200806260932.53563.knikanth@suse.de> In-Reply-To: <200806260932.53563.knikanth@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 561 Lines: 13 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/