Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261471AbTIKRd7 (ORCPT ); Thu, 11 Sep 2003 13:33:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261439AbTIKRdq (ORCPT ); Thu, 11 Sep 2003 13:33:46 -0400 Received: from mail.jlokier.co.uk ([81.29.64.88]:52881 "EHLO mail.jlokier.co.uk") by vger.kernel.org with ESMTP id S261464AbTIKRdA (ORCPT ); Thu, 11 Sep 2003 13:33:00 -0400 Date: Thu, 11 Sep 2003 18:32:45 +0100 From: Jamie Lokier To: Andi Kleen Cc: richard.brunner@amd.com, linux-kernel@vger.kernel.org, akpm@osdl.org, torvalds@osdl.org Subject: Re: [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata Message-ID: <20030911173245.GJ29532@mail.jlokier.co.uk> References: <99F2150714F93F448942F9A9F112634C0638B196@txexmtae.amd.com> <20030911012708.GD3134@wotan.suse.de> <20030911165845.GE29532@mail.jlokier.co.uk> <20030911190516.64128fe9.ak@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030911190516.64128fe9.ak@suse.de> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 893 Lines: 24 Andi Kleen wrote: > > if ((addr & 3) == 0) > > return 0; > > Maybe. But gcc generates quite good code (binary decision tree) code for > the switch() statement already so I don't think it is worth it to go > through complications just to avoid that. > > The decoder looks big in C, but when you take a look at its hot path in > assembly it is quite fast. I wonder. No part of the signal path looks especially slow, and yet as a whole it isn't that fast. The odd percentage slowdown here and there is quite bothersome. GCC generates a decision tree. You realise that about half of the branches in that tree will be mispredicted? -- Jamie - 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/