Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755416AbZCSPJ1 (ORCPT ); Thu, 19 Mar 2009 11:09:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753085AbZCSPJT (ORCPT ); Thu, 19 Mar 2009 11:09:19 -0400 Received: from smtp.ultrahosting.com ([74.213.174.254]:39921 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbZCSPJS (ORCPT ); Thu, 19 Mar 2009 11:09:18 -0400 Date: Thu, 19 Mar 2009 11:05:48 -0400 (EDT) From: Christoph Lameter X-X-Sender: cl@qirst.com To: KAMEZAWA Hiroyuki cc: Mel Gorman , Linux Memory Management List , Pekka Enberg , Rik van Riel , KOSAKI Motohiro , Johannes Weiner , Nick Piggin , Linux Kernel Mailing List , Lin Ming , Zhang Yanmin , Peter Zijlstra Subject: Re: [PATCH 24/27] Convert gfp_zone() to use a table of precalculated values In-Reply-To: <20090319090456.fb11e23c.kamezawa.hiroyu@jp.fujitsu.com> Message-ID: References: <1237226020-14057-1-git-send-email-mel@csn.ul.ie> <1237226020-14057-25-git-send-email-mel@csn.ul.ie> <20090318135222.GA4629@csn.ul.ie> <20090318153508.GA24462@csn.ul.ie> <20090318181717.GC24462@csn.ul.ie> <20090318194604.GD24462@csn.ul.ie> <20090319090456.fb11e23c.kamezawa.hiroyu@jp.fujitsu.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1306 Lines: 33 On Thu, 19 Mar 2009, KAMEZAWA Hiroyuki wrote: > I wonder why you have to make the bad caller work insane way ? > Is this bad ? > == > const int gfp_zone_table[GFP_ZONEMASK] = { > ZONE_NORMAL, /* 00 No flags set */ > ZONE_DMA, /* 01 Only GFP_DMA set */ > ZONE_HIGHMEM, /* 02 Only GFP_HIGHMEM set */ > BAD_ZONE, /* 03 GFP_HIGHMEM and GFP_DMA set */ > ZONE_DMA32, /* 04 Only GFP_DMA32 set */ > BAD_ZONE, /* 05 GFP_DMA and GFP_DMA32 set */ > BAD_ZONE, /* 06 GFP_DMA32 and GFP_HIGHMEM set */ > BAD_ZONE, /* 07 GFP_DMA, GFP_DMA32 and GFP_DMA32 set */ > ZONE_MOVABLE, /* 08 Only ZONE_MOVABLE set */ > ZONE_DMA, /* 09 MOVABLE + DMA */ > ZONE_MOVABLE, /* 0A MOVABLE + HIGHMEM */ > BAD_ZONE, /* 0B MOVABLE + DMA + HIGHMEM */ > ZONE_DMA32, /* 0C MOVABLE + DMA32 */ > BAD_ZONE, /* 0D MOVABLE + DMA + DMA32 */ > BAD_ZONE, /* 0E MOVABLE + DMA32 + HIGHMEM */ > BAD_ZONE /* 0F MOVABLE + DMA32 + HIGHMEM + DMA > }; > == It would work if we could check for BAD_ZONE with a VM_BUG_ON or a BUILD_BUG_ON. If I get some time I will look into this. -- 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/