Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933562AbXBXVKf (ORCPT ); Sat, 24 Feb 2007 16:10:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933563AbXBXVKf (ORCPT ); Sat, 24 Feb 2007 16:10:35 -0500 Received: from x35.xmailserver.org ([64.71.152.41]:2038 "EHLO x35.xmailserver.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933562AbXBXVKf (ORCPT ); Sat, 24 Feb 2007 16:10:35 -0500 X-AuthUser: davidel@xmailserver.org Date: Sat, 24 Feb 2007 13:10:33 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@alien.or.mcafeemobile.com To: Ingo Molnar cc: Linux Kernel Mailing List , Linus Torvalds , Arjan van de Ven , Christoph Hellwig , Andrew Morton , Alan Cox , Ulrich Drepper , Zach Brown , Evgeniy Polyakov , "David S. Miller" , Suparna Bhattacharya , Jens Axboe , Thomas Gleixner Subject: Re: [patch 04/13] syslets: core code In-Reply-To: <20070224070409.GB3357@elte.hu> Message-ID: References: <20070221211516.GD7579@elte.hu> <20070224070409.GB3357@elte.hu> X-GPG-FINGRPRINT: CFAE 5BEE FD36 F65E E640 56FE 0974 BF23 270F 474E X-GPG-PUBLIC_KEY: http://www.xmailserver.org/davidel.asc MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1624 Lines: 47 On Sat, 24 Feb 2007, Ingo Molnar wrote: > * Davide Libenzi wrote: > > > > +asmlinkage long > > > +sys_threadlet_on(unsigned long restore_stack, > > > + unsigned long restore_eip, > > > + struct async_head_user __user *ahu) > > > > +asmlinkage long sys_threadlet_off(void) > > > If we have a new syscall that does the exec, we can save the two > > on/off calls. > > the on/off calls are shaped in a way that makes them ultimately > vsyscall-able - the kernel only needs to know about the fact that we are > in a threadlet (so that the scheduler can do its special > push-head-to-another-context thing) - and this can be signalled via a > small user-space-side info structure as well, put into the TLS. IMO it's not a matter of speed. We'll have those two new syscalls, that I don't see other practical use for. IMO the best thing would be to hide all inside the sys_threadlet_exec (or whatever name). > > [...] Also, the complete_thread() thingy can be done automatically > > from inside the kernel upon function return, by hence making the > > threadlet function look like a normal thread function: > > yeah - and that's how it works in my current codebase already, > threadlet_off() takes a 'completion event' pointer as well, and the ahu. > I'll release v4 so that you can have a look. Ok. Will look into it... - Davide - 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/