Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 5 Dec 2001 15:49:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 5 Dec 2001 15:49:47 -0500 Received: from mail.xmailserver.org ([208.129.208.52]:64267 "EHLO mail.xmailserver.org") by vger.kernel.org with ESMTP id ; Wed, 5 Dec 2001 15:49:33 -0500 Date: Wed, 5 Dec 2001 13:00:31 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@blue1.dev.mcafeelabs.com To: Manfred Spraul cc: Shuji YAMAMURA , lkml Subject: Re: [PATCH] task_struct + kernel stack colouring ... In-Reply-To: <3C0E84B4.1070808@colorfullife.com> 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, 5 Dec 2001, Manfred Spraul wrote: > Davide Libenzi wrote > > > > > > >By adding three bits of colouring you're going to cut the collision of > >about 1/8. > > > No, Shuji is right: > You have just shifted the problem, without reducing collisions. > 256 kB, 4 way cache with 32 byte linesize. > > cacheline == bits 15..5 > offset within cacheline: bits 4..0 > > The colouring must depend on more than just bits 13 to 15 - if these > bits are different, then the access goes into a different line even > without colouring, there won't be a collision. Yep, damn true, using 13..15 I'll get "vertical" shift that is already implicit. In that case we need a more deep knowledge of the cache architecture like size and associativity. - 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/