Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261735AbTKBPg0 (ORCPT ); Sun, 2 Nov 2003 10:36:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261743AbTKBPg0 (ORCPT ); Sun, 2 Nov 2003 10:36:26 -0500 Received: from aun.it.uu.se ([130.238.12.36]:21695 "EHLO aun.it.uu.se") by vger.kernel.org with ESMTP id S261735AbTKBPgX (ORCPT ); Sun, 2 Nov 2003 10:36:23 -0500 Date: Sun, 2 Nov 2003 16:36:22 +0100 (MET) Message-Id: <200311021536.hA2FaMmY016943@harpo.it.uu.se> From: Mikael Pettersson To: linux-kernel@vger.kernel.org Subject: [RFC][PATCH][2.6] CONFIG_HZ for x86 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3717 Lines: 102 This patch adds a CONFIG_HZ option to x86, allowing the kernel- internal HZ to be reduced from 1000 to 512 or 100. This solves lost timer interrupt problems on really old machines like my 486. According to Alan Cox, HZ==1000 is also harmful on some laptops (presumably due to long SMI windows), so this patch should be useful for those too. Selecting a lower HZ may also help thermal efficiency slightly, by allowing machines to idle longer between timer interrupts. HZ==100 also reduces the size of the kernel, since it eliminates a lot of HZ<-->USER_HZ conversions. HZ==512 may or may not be useful, but it does work. Why 512 and not 500? It's to avoid having to correct for HZ != 1< #if (HZ % USER_HZ)==0 -# define jiffies_to_clock_t(x) ((x) / (HZ / USER_HZ)) +# define jiffies_to_clock_t(x) ((clock_t) ((x) / (HZ / USER_HZ))) #else # define jiffies_to_clock_t(x) ((clock_t) jiffies_64_to_clock_t((u64) x)) #endif - 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/