From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932738AbXCHHY5 (ORCPT ); Thu, 8 Mar 2007 02:24:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932942AbXCHHY5 (ORCPT ); Thu, 8 Mar 2007 02:24:57 -0500 Received: from gw1.cosmosbay.com ([86.65.150.130]:58001 "EHLO gw1.cosmosbay.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932738AbXCHHY4 (ORCPT ); Thu, 8 Mar 2007 02:24:56 -0500 Message-ID: <45EFBA14.9090307@cosmosbay.com> Date: Thu, 08 Mar 2007 08:24:04 +0100 From: Eric Dumazet User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Kyle Moffett CC: "Michael K. Edwards" , Linus Torvalds , Anton Blanchard , Davide Libenzi , Avi Kivity , Linux Kernel Mailing List , Andrew Morton , Al Viro Subject: Re: [patch] epoll use a single inode ... References: <45ED1A3C.6030707@argo.co.il> <200703071906.58405.dada1@cosmosbay.com> <200703071952.13219.dada1@cosmosbay.com> <20070307221401.GA16938@kryten> <6E1C86DF-D512-418C-B270-BC5C4316BC0A@mac.com> In-Reply-To: <6E1C86DF-D512-418C-B270-BC5C4316BC0A@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (gw1.cosmosbay.com [86.65.150.130]); Thu, 08 Mar 2007 08:24:06 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Kyle Moffett a écrit : > > Prefetching is also fairly critical on a Power4 or G5 PowerPC system as > they have a long memory latency; an L2-cache miss can cost 200+ cycles. > On such systems the "dcbt" prefetch instruction brings in a single > 128-byte cacheline and has no serializing effects whatsoever, making it > ideal for use in a linked-list-traversal inner loop. OK, 200 cycles... But what is the cost of the conditional branch you added in prefetch(x) ? if (!x) return; (correctly predicted or not, but do powerPC have a BTB ?) About the NULL 'potential problem', maybe we could use a dummy nil (but mapped) object, and use its address in lists, ie compare for &nil instead of NULL. This would avoid : - The conditional test in some prefetch() implementations - The potential TLB problem with the NULL value.