Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030585AbXBFXjh (ORCPT ); Tue, 6 Feb 2007 18:39:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030588AbXBFXjh (ORCPT ); Tue, 6 Feb 2007 18:39:37 -0500 Received: from rgminet01.oracle.com ([148.87.113.118]:24074 "EHLO rgminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030585AbXBFXjg (ORCPT ); Tue, 6 Feb 2007 18:39:36 -0500 Date: Tue, 6 Feb 2007 15:39:07 -0800 From: Joel Becker To: Davide Libenzi Cc: Kent Overstreet , Linus Torvalds , Zach Brown , Ingo Molnar , Linux Kernel Mailing List , linux-aio@kvack.org, Suparna Bhattacharya , Benjamin LaHaise Subject: Re: [PATCH 2 of 4] Introduce i386 fibril scheduling Message-ID: <20070206233907.GW32307@ca-server1.us.oracle.com> Mail-Followup-To: Davide Libenzi , Kent Overstreet , Linus Torvalds , Zach Brown , Ingo Molnar , Linux Kernel Mailing List , linux-aio@kvack.org, Suparna Bhattacharya , Benjamin LaHaise References: <8CF4BE18-8EEF-4ACA-A4B4-B627ED3B4831@oracle.com> <6f703f960702051331v3ceab725h68aea4cd77617f84@mail.gmail.com> <6f703f960702061445q23dd9d48q7afec75d2400ef62@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Burt-Line: Trees are cool. X-Red-Smith: Ninety feet between bases is perhaps as close as man has ever come to perfection. User-Agent: Mutt/1.5.11 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1451 Lines: 43 On Tue, Feb 06, 2007 at 03:23:47PM -0800, Davide Libenzi wrote: > struct async_submit { > void *cookie; > int sysc_nbr; > int nargs; > long args[ASYNC_MAX_ARGS]; > int async_result; > }; > > int async_submit(struct async_submit *a, int n); > > And async_submit() can mark each one ->async_result with -EASYNC (syscall > has been batched), or another code (syscall completed w/out schedule). > IMO, once you get a -EASYNC for a syscall, you *have* to retire the result. There are pains here, though. On every submit, you have to walk the entire vector just to know what did or did not complete. I've seen this in other APIs (eg, async_result would be -EAGAIN for lack of resources to start this particular fibril). Userspace submit ends up always walking the array of submissions twice - once to prep them, and once to check if they actually went async. For longer lists of I/Os, this is expensive. Joel -- "Too much walking shoes worn thin. Too much trippin' and my soul's worn thin. Time to catch a ride it leaves today Her name is what it means. Too much walking shoes worn thin." Joel Becker Principal Software Developer Oracle E-mail: joel.becker@oracle.com Phone: (650) 506-8127 - 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/