Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946025AbWKJI0J (ORCPT ); Fri, 10 Nov 2006 03:26:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1424380AbWKJI0I (ORCPT ); Fri, 10 Nov 2006 03:26:08 -0500 Received: from mail.suse.de ([195.135.220.2]:55513 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S1424379AbWKJI0G (ORCPT ); Fri, 10 Nov 2006 03:26:06 -0500 To: "Bela Lubkin" Cc: linux-kernel@vger.kernel.org, mingo@elte.hu Subject: Re: touch_cache() only touches two thirds References: From: Andi Kleen Date: 10 Nov 2006 09:25:51 +0100 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 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 Content-Length: 918 Lines: 21 "Bela Lubkin" writes: > > /* > * Dirty a big buffer in a hard-to-predict (for the L2 cache) way. This > * is the operation that is timed, so we try to generate unpredictable > * cachemisses that still end up filling the L2 cache: > */ The comment is misleading anyways. AFAIK several of the modern CPUs (at least K8, later P4s, Core2, POWER4+, PPC970) have prefetch predictors advanced enough to follow several streams forward and backwards in parallel. I hit this while doing NUMA benchmarking for example. Most likely to be really unpredictable you need to use a true RND and somehow make sure still the full cache range is covered. -Andi - 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/