From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266272AbUBLExE (ORCPT ); Wed, 11 Feb 2004 23:53:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266278AbUBLExE (ORCPT ); Wed, 11 Feb 2004 23:53:04 -0500 Received: from dictum-ext.geekmail.cc ([204.239.179.245]:27331 "EHLO mailer01.geekmail.cc") by vger.kernel.org with ESMTP id S266272AbUBLEw5 (ORCPT ); Wed, 11 Feb 2004 23:52:57 -0500 Message-ID: <402B0697.7010109@swapped.cc> Date: Wed, 11 Feb 2004 20:52:39 -0800 From: Alex Pankratov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andi Kleen CC: acme@conectiva.com.br, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [2.6] [1/2] hlist: replace explicit checks of hlist fields w/ func calls References: <4029CB7B.3090409@swapped.cc> <20040213231407.208204c4.ak@suse.de> <4029D267.40307@swapped.cc> <20040214012805.52e4af60.ak@suse.de> In-Reply-To: <20040214012805.52e4af60.ak@suse.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Andi Kleen wrote: > On Tue, 10 Feb 2004 22:57:43 -0800 > Alex Pankratov wrote: > > >>Ugh, yeah, I thought about this. However my understand was that >>since hlist_null is statically allocated variable, its address >>will be a known constant at a link time (whether it's a static >>link or dynamic/run-time link - btw, excuse my lack of proper >>terminology here). So comparing something to &null would be >>equivalent to comparing to the constant and not require an >>extra register. > > > Hmm, you're right. Apparently I was still thinking about the bad > code generated by the standard list_heads. > A quick note about standard lists then - circular double-linked lists are normally described in textbooks as a clever trick allowing to avoid if's in insert() and delete(). Given what you have noted about CMP speed above, I wonder if simple 0-terminated lists would be something to consider for lower-end i386. Alex