Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750856AbWJMOXK (ORCPT ); Fri, 13 Oct 2006 10:23:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750929AbWJMOXK (ORCPT ); Fri, 13 Oct 2006 10:23:10 -0400 Received: from kanga.kvack.org ([66.96.29.28]:29904 "EHLO kanga.kvack.org") by vger.kernel.org with ESMTP id S1750856AbWJMOXJ (ORCPT ); Fri, 13 Oct 2006 10:23:09 -0400 Date: Fri, 13 Oct 2006 10:22:57 -0400 From: Benjamin LaHaise To: "Chen, Kenneth W" Cc: "'Zach Brown'" , "'Suparna Bhattacharya'" , "Lahaise, Benjamin C" , linux-kernel@vger.kernel.org, "'linux-aio'" Subject: Re: [patch] clarify AIO_EVENTS_OFFSET constant Message-ID: <20061013142257.GJ4141@kvack.org> References: <000301c6ee5a$9dfae250$db34030a@amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000301c6ee5a$9dfae250$db34030a@amr.corp.intel.com> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 785 Lines: 18 On Thu, Oct 12, 2006 at 05:00:24PM -0700, Chen, Kenneth W wrote: > A clean up patch: I think it is a lot easier to read AIO_EVENTS_OFFSET > as an offset because of aio_ring at the beginning of a head page, instead > of doing arithmetic of (event on 2nd page - event on 1st page). Nak. Your change fails if aio_ring is not an exact multiple of the io_event size due to rounding errors, while the original code rounds correctly. -ben -- "Time is of no importance, Mr. President, only life is important." Don't Email: . - 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/