Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752054AbXB1VaW (ORCPT ); Wed, 28 Feb 2007 16:30:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752068AbXB1VaW (ORCPT ); Wed, 28 Feb 2007 16:30:22 -0500 Received: from mx2.mail.elte.hu ([157.181.151.9]:49809 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054AbXB1VaV (ORCPT ); Wed, 28 Feb 2007 16:30:21 -0500 Date: Wed, 28 Feb 2007 22:23:06 +0100 From: Ingo Molnar To: Davide Libenzi Cc: Ulrich Drepper , Linux Kernel Mailing List , Linus Torvalds , Arjan van de Ven , Christoph Hellwig , Andrew Morton , Alan Cox , Zach Brown , Evgeniy Polyakov , "David S. Miller" , Suparna Bhattacharya , Jens Axboe , Thomas Gleixner Subject: Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 Message-ID: <20070228212306.GA27127@elte.hu> References: <20070221211355.GA7302@elte.hu> <20070221233111.GB5895@elte.hu> <45DCD9E5.2010106@redhat.com> <20070222074044.GA4158@elte.hu> <20070228094522.GA17716@elte.hu> <20070228202156.GA15846@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -2.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.0.3 -2.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2861 Lines: 67 * Davide Libenzi wrote: > On Wed, 28 Feb 2007, Ingo Molnar wrote: > > > > > * Davide Libenzi wrote: > > > > > My point is, the syslet infrastructure is expensive for the kernel in > > > terms of compat, [...] > > > > it is not. Today i've implemented 64-bit syslets on x86_64 and > > 32-bit-on-64-bit compat syslets. Both the 64-bit and the 32-bit syslet > > (and threadlet) binaries work just fine on a 64-bit kernel, and they > > share 99% of the infrastructure. There's only a single #ifdef > > CONFIG_COMPAT in kernel/async.c: > > > > #ifdef CONFIG_COMPAT > > > > asmlinkage struct syslet_uatom __user * > > compat_sys_async_exec(struct syslet_uatom __user *uatom, > > struct async_head_user __user *ahu) > > { > > return __sys_async_exec(uatom, ahu, &compat_sys_call_table, > > compat_NR_syscalls); > > } > > > > #endif > > Did you hide all the complexity of the userspace atom decoding inside > another function? :) no, i made the 64-bit and 32-bit structures layout-compatible. This makes the 32-bit structure as large as the 64-bit ones, but that's not a big issue, compared to the simplifications it brings. > > But i'm happy to change the syslet API in any sane way, and did so > > based on feedback from Jens who is actually using them. > > Wouldn't you agree on a simple/parallel execution engine [...] the thing is, there's almost zero overhead from having those basic things like conditions and the ->next link, and they make it so much more capable. As usual my biggest problem is that you are not trying to use syslets at all - you are only trying to get rid of them ;-) My purpose with syslets is to enable a syslet to do almost anything that user-space could do too, as simply as possible. Syslets could even allocate user-space memory and then use it (i dont think we actually want to do that though). That doesnt mean arbitrary complex code /should/ be done via syslets, or that it wont be significantly slower than what user-space can do, but i'd not like to artificially dumb the engine down. I'm totally willing to simplify/shrink the vectoring of arguments and just about anything else, but your proposals so far (such as your return-value-embedded-in-atom suggestion) all kill important aspects of the engine. All the existing syslet features were purpose-driven: i actually coded up a sample syslet, trying to do something that makes sense, and added these features based on that. The engine core takes up maybe 50 lines of code. Ingo - 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/