Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 7 Mar 2002 15:39:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 7 Mar 2002 15:39:25 -0500 Received: from chaos.analogic.com ([204.178.40.224]:14466 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id ; Thu, 7 Mar 2002 15:39:11 -0500 Date: Thu, 7 Mar 2002 15:38:09 -0500 (EST) From: "Richard B. Johnson" Reply-To: root@chaos.analogic.com To: William Lee Irwin III cc: Andrea Arcangeli , linux-kernel@vger.kernel.org, riel@surriel.com, hch@infradead.org, phillips@bonn-fries.net Subject: Re: 2.4.19pre2aa1 In-Reply-To: <20020307201819.GF786@holomorphy.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 Thu, 7 Mar 2002, William Lee Irwin III wrote: > On Thu, Mar 07, 2002 at 06:03:00PM +0100, Andrea Arcangeli wrote: > > For the other points I think you shouldn't really complain (both at > > runtime and in code style as well, please see how clean it is with the > > wait_table_t thing), I made a definitive improvement to your code, the > > only not obvious part is the hashfn but I really cannot see yours > > beating mine because of the total random input, infact it could be the > > other way around due the fact if something there's the probability the > > pages are physically consecutive and I take care of that fine. > > > I don't know whose definition of clean code this is: > > +static inline wait_queue_head_t * wait_table_hashfn(struct page * page, wait_table_t * wait_table) > +{ > +#define i (((unsigned long) page)/(sizeof(struct page) & ~ (sizeof(struct page) - 1))) > +#define s(x) ((x)+((x)>>wait_table->shift)) > + return wait_table->head + (s(i) & (wait_table->size-1)); > +#undef i > +#undef s > +} > > > I'm not sure I want to find out. > > > Bill Methinks there is entirely too much white-space in the code. It is almost readable *;). It probably could be fixed up to slip through the compiler with no possibility of human interpretation, but that would take a bit more work ;^) The choice of temporaries makes me think of a former President who, when confronted with a lie, said; "It depends upon what 'is' is!" Keep up the good work! Cheers, Dick Johnson Penguin : Linux version 2.4.18 on an i686 machine (799.53 BogoMips). Bill Gates? Who? - 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/