Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933235AbXBXAGj (ORCPT ); Fri, 23 Feb 2007 19:06:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933238AbXBXAGi (ORCPT ); Fri, 23 Feb 2007 19:06:38 -0500 Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:43216 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S933235AbXBXAGh (ORCPT ); Fri, 23 Feb 2007 19:06:37 -0500 Date: Sat, 24 Feb 2007 01:08:24 +0000 From: Alan To: "Michael K. Edwards" Cc: "Ingo Molnar" , "Evgeniy Polyakov" , "Ulrich Drepper" , linux-kernel@vger.kernel.org, "Linus Torvalds" , "Arjan van de Ven" , "Christoph Hellwig" , "Andrew Morton" , "Zach Brown" , "David S. Miller" , "Suparna Bhattacharya" , "Davide Libenzi" , "Jens Axboe" , "Thomas Gleixner" Subject: Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 Message-ID: <20070224010824.5cf6c0ac@lxorguk.ukuu.org.uk> In-Reply-To: References: <20070221211355.GA7302@elte.hu> <20070221233111.GB5895@elte.hu> <45DCD9E5.2010106@redhat.com> <20070222074044.GA4158@elte.hu> <20070222113148.GA3781@2ka.mipt.ru> <20070222125931.GB25788@elte.hu> <20070223003018.0d244576@lxorguk.ukuu.org.uk> <20070223123718.54c9670e@lxorguk.ukuu.org.uk> X-Mailer: Claws Mail 2.7.2 (GTK+ 2.10.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 35 > long my_threadlet_fn(void *data) > { > char *name = data; > int fd; > > fd = open(name, O_RDONLY); > if (fd < 0) > goto out; > > fstat(fd, &stat); > read(fd, buf, count) > ... > > out: > return threadlet_complete(); > } > > You're telling me that runs entirely in kernel space when open() > blocks, and doesn't touch errno if fstat() fails? Now who hasn't read > the code? That example touches back into user space, but doesnt involve MMU changes or cache flushes, or tlb flushes, or floating point. errno is thread specific if you use it but errno is as I said before entirely a C library detail that you don't have to suffer if you don't want to. Avoiding that saves a segment register load - which isn't too costly but isn't free. Alan - 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/