Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755189AbYHCFEi (ORCPT ); Sun, 3 Aug 2008 01:04:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751470AbYHCFEa (ORCPT ); Sun, 3 Aug 2008 01:04:30 -0400 Received: from an-out-0708.google.com ([209.85.132.243]:50682 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbYHCFEa (ORCPT ); Sun, 3 Aug 2008 01:04:30 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=HUOw34QSC3N8xTC/iWtLg89KuRvy/B1WnEfFsaD6moOphCacW3uUoRWEE7QshxUe/n z4sqfJjzg3pQi1wpb7EXpkAj3vrc4v50Rtq5Rc0uBV4dcMzp+iE9oCCIMzbUJehv5BGL Xasvf17PaydQkgNNC+791MydrCYkX0DTBu434= Message-ID: <86802c440808022204s62ff2b35g391125babdb2e8e4@mail.gmail.com> Date: Sat, 2 Aug 2008 22:04:28 -0700 From: "Yinghai Lu" To: "Johannes Weiner" Subject: Re: [PATCH 03/25] add dyn_array support Cc: "Ingo Molnar" , "Thomas Gleixner" , "H. Peter Anvin" , "Eric W. Biederman" , "Dhaval Giani" , "Mike Travis" , "Andrew Morton" , linux-kernel@vger.kernel.org In-Reply-To: <87sktm1yuu.fsf@saeurebad.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1217732365-16595-1-git-send-email-yhlu.kernel@gmail.com> <1217732365-16595-2-git-send-email-yhlu.kernel@gmail.com> <1217732365-16595-3-git-send-email-yhlu.kernel@gmail.com> <1217732365-16595-4-git-send-email-yhlu.kernel@gmail.com> <871w163fuw.fsf@saeurebad.de> <86802c440808022121u3dcdbda2s5ff463f4b330ca17@mail.gmail.com> <87sktm1yuu.fsf@saeurebad.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1413 Lines: 46 On Sat, Aug 2, 2008 at 9:55 PM, Johannes Weiner wrote: > Hi, > > "Yinghai Lu" writes: > >> On Sat, Aug 2, 2008 at 9:03 PM, Johannes Weiner wrote: >>> Hi, >>> >>> Yinghai Lu writes: >>> >>>> could have crazy big arrays and allocate them in bootmem at init stage. >>>> also also to allocate array according to size we need to use to avoid wasting >>>> memory >>>> use CONFIG_HAVE_DYN_ARRAY to enable it or not >>>> >>>> usage: >>>> >>>> |static struct irq_desc irq_desc_init __initdata = { >>>> | .status = IRQ_DISABLED, >>>> | .chip = &no_irq_chip, >>>> | .handle_irq = handle_bad_irq, >>>> | .depth = 1, >>>> | .lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock), >>>> |#ifdef CONFIG_SMP >>>> | .affinity = CPU_MASK_ALL >>>> |#endif >>>> |}; >>>> | >>>> |static void __init init_work(void *data) >>>> |{ >>>> | struct dyn_array *da = data; >>>> | struct irq_desc *desc; >>>> | int i; >>>> | >>>> | desc = *da->name; >>> >>> Where *da->name might be NULL... *da->name = __alloc_bootmem_nopanic(size, da->align, phys); YH -- 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/