Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 8 Jan 2002 19:32:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 8 Jan 2002 19:32:22 -0500 Received: from waste.org ([209.173.204.2]:36235 "EHLO waste.org") by vger.kernel.org with ESMTP id ; Tue, 8 Jan 2002 19:32:16 -0500 Date: Tue, 8 Jan 2002 18:31:42 -0600 (CST) From: Oliver Xymoron To: Andrew Morton cc: Daniel Phillips , Anton Blanchard , Andrea Arcangeli , Luigi Genoni , Dieter N?tzel , Marcelo Tosatti , Rik van Riel , Linux Kernel List , Robert Love Subject: Re: [2.4.17/18pre] VM and swap - it's really unusable In-Reply-To: <3C3B4CB7.FEAAF5FC@zip.com.au> Message-ID: 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 On Tue, 8 Jan 2002, Andrew Morton wrote: > > What a preemptible kernel can do that a non-preemptible kernel can't is: > > reschedule exactly as often as necessary, instead of having lots of extra > > schedule points inserted all over the place, firing when *they* think the > > time is right, which may well be earlier than necessary. > > Nope. `if (current->need_resched)' -> the time is right (beyond right, > actually). Have we ever considered making rescheduling work like get_user? That is, make current->need_resched be a pointer, and if we need to reschedule, make it an INVALID pointer that causes us to fault and call schedule in its fault path? Orthogonally, for rescheduling points with locks, we could build a version of the spinlocks that know when they're blocking other processes and can do a spin_yield(&lock) in places where they can safely give up a lock. On single processor, spin_yield could translate to a scheduling point. -- "Love the dolphins," she advised him. "Write by W.A.S.T.E.." - 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/