From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161338AbXDVQQg (ORCPT ); Sun, 22 Apr 2007 12:16:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161359AbXDVQQf (ORCPT ); Sun, 22 Apr 2007 12:16:35 -0400 Received: from qb-out-0506.google.com ([72.14.204.237]:41006 "EHLO qb-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161338AbXDVQQe (ORCPT ); Sun, 22 Apr 2007 12:16:34 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lb1HSM8xC4jsM/P32JXf3w91y53MoSWhZnfkf8eLjyYigVKJth5P+wjsEOgwuX1RlY/LlI0WhRDD4XtFjC0xutZoKt53b7lf3U6v3omurGY5RY+xulT5LHG3EpjI7m4bFmyk5Yh80NbJaz21ZUojUlePH/gHGipruvrTXpWYcak= Message-ID: Date: Sun, 22 Apr 2007 09:16:31 -0700 From: "Ulrich Drepper" To: "William Lee Irwin III" Subject: Re: [REPORT] cfs-v4 vs sd-0.44 Cc: "Linus Torvalds" , "Kyle Moffett" , "Willy Tarreau" , "Ingo Molnar" , "Con Kolivas" , linux-kernel@vger.kernel.org, "Andrew Morton" , "Nick Piggin" , "Mike Galbraith" , "Arjan van de Ven" , "Peter Williams" , "Thomas Gleixner" , caglar@pardus.org.tr, "Gene Heskett" , "Rusty Russell" In-Reply-To: <20070422084843.GJ2986@holomorphy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070421154614.GA26169@elte.hu> <20070421164241.GF2986@holomorphy.com> <20070422070238.GH2986@holomorphy.com> <20070422084843.GJ2986@holomorphy.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 4/22/07, William Lee Irwin III wrote: > On Sun, Apr 22, 2007 at 12:17:31AM -0700, Ulrich Drepper wrote: > > For futex(), the extension is needed for the FUTEX_WAIT operation. We > > need a new operation FUTEX_WAIT_FOR or so which takes another (the > > fourth) parameter which is the PID of the target. > > For FUTEX_LOCK_PI we need no extension. The futex value is the PID of > > the current owner. This is required for the whole interface to work > > in the first place. > > We'll have to send things out and see what sticks here. There seems to > be some pickiness above. I know Rusty will shudder since it makes futexes yet more complicated (although only if the user wants it) but if you introduce the concept of "yield to" then this extension makes really sense and it is a quite simple extension. Plus: I'm the most affected by the change since I have to change code to use it and I'm fine with it. Oh, last time I didn't explicitly mention the cases of waitpid()/wait4()/waitid() explicitly naming a process to wait on. I think it's clear that those cases also should be changed to use yield to if possible. I don't have a good suggestion what to do when the call waits for any child. Perhaps yielding to the last created one is fine. If delays through reading on a pipe are recognized as well and handle with yield to then the time slot will automatically be forwarded to the first runnable process in the pipe sequence. I.e., running grep foo /etc/passwd | cut -d: -f2 | crack probably will create 'crack' last. Giving the remainder of the time slot should result is recognizing it waits for 'cut' which in turn waits for 'grep'. So in the end 'grep' gets the timeslot. Seems quite complicated from the outside but I can imagine quite good results from this.