Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 18 Apr 2002 06:03:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 18 Apr 2002 06:03:16 -0400 Received: from [195.39.17.254] ([195.39.17.254]:52364 "EHLO Elf.ucw.cz") by vger.kernel.org with ESMTP id ; Thu, 18 Apr 2002 06:03:16 -0400 Date: Thu, 18 Apr 2002 11:41:28 +0200 From: Pavel Machek To: Rik van Riel Cc: Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: [PATCH] for_each_zone / for_each_pgdat Message-ID: <20020418094128.GA114@elf.ucw.cz> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Warning: Reading this can be dangerous to your mental health. Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi! > replace slightly obscure while loops with for_each_zone and > for_each_pgdat macros, this version has the added optimisation > of skipping empty zones (thanks to William Lee Irwin) @@ -501,7 +497,7 @@ pg_data_t *pgdat = pgdat_list; unsigned int sum = 0; - do { + for_each_pgdat(pgdat) { zonelist_t *zonelist = pgdat->node_zonelists + (GFP_USER & GFP_ZONEMASK); zone_t **zonep = zonelist->zones; zone_t *zone; You can kill pgdat initialization here. Pavel -- (about SSSCA) "I don't say this lightly. However, I really think that the U.S. no longer is classifiable as a democracy, but rather as a plutocracy." --hpa - 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/