Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932438AbWBGBhj (ORCPT ); Mon, 6 Feb 2006 20:37:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932443AbWBGBhj (ORCPT ); Mon, 6 Feb 2006 20:37:39 -0500 Received: from quechua.inka.de ([193.197.184.2]:42462 "EHLO mail.inka.de") by vger.kernel.org with ESMTP id S932438AbWBGBhi (ORCPT ); Mon, 6 Feb 2006 20:37:38 -0500 From: be-news06@lina.inka.de (Bernd Eckenfels) To: linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: implement swap prefetching Organization: Private Site running Debian GNU/Linux In-Reply-To: <20060206163842.7ff70c49.akpm@osdl.org> X-Newsgroups: ka.lists.linux.kernel User-Agent: tin/1.7.8-20050315 ("Scalpay") (UNIX) (Linux/2.6.13.4 (i686)) Message-Id: Date: Tue, 07 Feb 2006 02:37:36 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 991 Lines: 25 Andrew Morton wrote: >> +/* >> + * How many pages to prefetch at a time. We prefetch SWAP_CLUSTER_MAX * >> + * swap_prefetch per PREFETCH_INTERVAL, but prefetch ten times as much at a >> + * time in laptop_mode to minimise the time we keep the disk spinning. >> + */ >> +static inline unsigned long prefetch_pages(void) >> +{ >> + return (SWAP_CLUSTER_MAX * swap_prefetch * (1 + 9 * !!laptop_mode)); >> +} > > I don't think this should be done in-kernel. There's a nice script to > start and stop laptop mode. We can make this decision in that script. I agree, the default could be depending on laptop mode, but if a value is specified or changed by sysctl, it should not be automatically tuned (in that case) Gruss Bernd - 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/