Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 17 Jan 2002 15:06:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 17 Jan 2002 15:06:06 -0500 Received: from tmr-02.dsl.thebiz.net ([216.238.38.204]:781 "EHLO gatekeeper.tmr.com") by vger.kernel.org with ESMTP id ; Thu, 17 Jan 2002 15:05:55 -0500 Date: Thu, 17 Jan 2002 14:52:31 -0500 (EST) From: Bill Davidsen To: Alexei Podtelezhnikov cc: linux-kernel@vger.kernel.org Subject: Re: [o(1) sched J0] higher priority smaller timeslices, in fact In-Reply-To: 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 Wed, 16 Jan 2002, Alexei Podtelezhnikov wrote: > I still suggest a different set as faster and more readable at least to > me. Just two operations instead of 4! > > #define NICE_TO_TIMESLICE(n) (((n)+21)*(HZ/10)) // should be positive! > #define MAX_TIMESLICE NICE_TO_TIMESLICE(19) > #define MIN_TIMESLICE NICE_TO_TIMESLICE(-20) Looks more readable. I wouldn't bet on faster, but definitely more readable. -- bill davidsen CTO, TMR Associates, Inc Doing interesting things with little computers since 1979. - 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/