From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933114AbXCAIj4 (ORCPT ); Thu, 1 Mar 2007 03:39:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933108AbXCAIjz (ORCPT ); Thu, 1 Mar 2007 03:39:55 -0500 Received: from relay.2ka.mipt.ru ([194.85.82.65]:42472 "EHLO 2ka.mipt.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933114AbXCAIjy (ORCPT ); Thu, 1 Mar 2007 03:39:54 -0500 Date: Thu, 1 Mar 2007 11:38:06 +0300 From: Evgeniy Polyakov To: Davide Libenzi Cc: Chris Friesen , Linus Torvalds , Ingo Molnar , Ulrich Drepper , Linux Kernel Mailing List , Arjan van de Ven , Christoph Hellwig , Andrew Morton , Alan Cox , Zach Brown , "David S. Miller" , Suparna Bhattacharya , Jens Axboe , Thomas Gleixner Subject: Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 Message-ID: <20070301083806.GF7217@2ka.mipt.ru> References: <20070222074044.GA4158@elte.hu> <20070228094522.GA17716@elte.hu> <45E5D217.9060101@nortel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (2ka.mipt.ru [0.0.0.0]); Thu, 01 Mar 2007 11:38:50 +0300 (MSK) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 28, 2007 at 11:42:24AM -0800, Davide Libenzi (davidel@xmailserver.org) wrote: > On Wed, 28 Feb 2007, Chris Friesen wrote: > > > Davide Libenzi wrote: > > > > > struct async_syscall { > > > unsigned long nr_sysc; > > > unsigned long params[8]; > > > long *result; > > > }; > > > > > > And what would async_wait() return bak? Pointers to "struct async_syscall" > > > or pointers to "result"? > > > > Either one has downsides. Pointer to struct async_syscall requires that the > > caller keep the struct around. Pointer to result requires that the caller > > always reserve a location for the result. > > > > Does the kernel care about the (possibly rare) case of callers that don't want > > to pay attention to result? If so, what about adding some kind of > > caller-specified handle to struct async_syscall, and having async_wait() > > return the handle? In the case where the caller does care about the result, > > the handle could just be the address of result. > > Something like this (with async_wait() returning asynid's)? > > struct async_syscall { > long *result; > unsigned long asynid; > unsigned long nr_sysc; > unsigned long params[8]; > }; Having result pointer as NULL might imply that result is not interested in and thus it can be discarded and event async syscall will not be returned through aync_wait(). More flexible is having request flags field in the structure. > - Davide > -- Evgeniy Polyakov