Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964814AbWCHADG (ORCPT ); Tue, 7 Mar 2006 19:03:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964813AbWCHADG (ORCPT ); Tue, 7 Mar 2006 19:03:06 -0500 Received: from smtp.osdl.org ([65.172.181.4]:23276 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S964812AbWCHADE (ORCPT ); Tue, 7 Mar 2006 19:03:04 -0500 Date: Tue, 7 Mar 2006 16:05:15 -0800 From: Andrew Morton To: Con Kolivas Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, ck@vds.kolivas.org Subject: Re: [PATCH] mm: yield during swap prefetching Message-Id: <20060307160515.0feba529.akpm@osdl.org> In-Reply-To: References: <200603081013.44678.kernel@kolivas.org> <20060307152636.1324a5b5.akpm@osdl.org> X-Mailer: Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-vine-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: 1151 Lines: 25 Con Kolivas wrote: > > > yield() really sucks if there are a lot of runnable tasks. And the amount > > of CPU which that thread uses isn't likely to matter anyway. > > > > I think it'd be better to just not do this. Perhaps alter the thread's > > static priority instead? Does the scheduler have a knob which can be used > > to disable a tasks's dynamic priority boost heuristic? > > We do have SCHED_BATCH but even that doesn't really have the desired effect. > I know how much yield sucks and I actually want it to suck as much as yield > does. Why do you want that? If prefetch is doing its job then it will save the machine from a pile of major faults in the near future. The fact that the machine happens to be running a number of busy tasks doesn't alter that. It's _worth_ stealing a few cycles from those tasks now to avoid lengthy D-state sleeps in the near future? - 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/