Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 5 Oct 2001 22:52:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 5 Oct 2001 22:52:36 -0400 Received: from [208.129.208.52] ([208.129.208.52]:24836 "EHLO xmailserver.org") by vger.kernel.org with ESMTP id ; Fri, 5 Oct 2001 22:52:27 -0400 Date: Fri, 5 Oct 2001 19:57:49 -0700 (PDT) From: Davide Libenzi X-X-Sender: davide@blue1.dev.mcafeelabs.com To: "Albert D. Cahalan" cc: Alan Cox , Benjamin LaHaise , Linus Torvalds , Subject: Re: Context switch times In-Reply-To: <200110060224.f962O53104349@saturn.cs.uml.edu> 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 Fri, 5 Oct 2001, Albert D. Cahalan wrote: > If cache problems are bad enough, maybe this pays for itself: > > /* old */ > current = stack_ptr & ~0x1fff; > > /* new */ > hash = (stack_ptr>>8)^(stack_ptr>>12)^(stack_ptr>>16)^(stack_ptr>>20); > current = (stack_ptr & ~0x1fff) | (hash & 0x1e0); I suggested something like this ( randomly "moved" struct task_struct * ) a couple of years ago. Never tried to measure the impact of the system though. - Davide - 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/