Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 7 Feb 2001 13:01:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 7 Feb 2001 13:01:00 -0500 Received: from [62.172.234.2] ([62.172.234.2]:11861 "EHLO localhost.localdomain") by vger.kernel.org with ESMTP id ; Wed, 7 Feb 2001 13:00:47 -0500 Date: Wed, 7 Feb 2001 18:00:40 +0000 (GMT) From: Hugh Dickins To: Linus Torvalds cc: Rik van Riel , linux-kernel@vger.kernel.org Subject: [PATCH] micro-opt DEBUG_ADD_PAGE In-Reply-To: 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 Tue, 6 Feb 2001, Linus Torvalds wrote: > > - if (bh->b_size % correct_size) { > > + if (bh->b_size != correct_size) { > > Actually, I'd rather leave it in, but speed it up with the saner and > faster if (bh->b_size & (correct_size-1)) { Micro-optimization season? --- linux-2.4.2-pre1/include/linux/swap.h Wed Feb 7 15:21:13 2001 +++ linux/include/linux/swap.h Wed Feb 7 17:21:25 2001 @@ -200,8 +200,8 @@ * with the pagemap_lru_lock held! */ #define DEBUG_ADD_PAGE \ - if (PageActive(page) || PageInactiveDirty(page) || \ - PageInactiveClean(page)) BUG(); + if ((page)->flags & ((1<