Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751726Ab0DMF3G (ORCPT ); Tue, 13 Apr 2010 01:29:06 -0400 Received: from acsinet11.oracle.com ([141.146.126.233]:22931 "EHLO acsinet11.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800Ab0DMF3E (ORCPT ); Tue, 13 Apr 2010 01:29:04 -0400 Message-ID: <4BC40074.6030604@oracle.com> Date: Mon, 12 Apr 2010 22:26:12 -0700 From: Yinghai User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.0.4-1.1.1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Benjamin Herrenschmidt CC: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , David Miller , Linus Torvalds , Johannes Weiner , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 07/39] lmb: Add lmb_find_area() References: <1270793048-23796-1-git-send-email-yinghai@kernel.org> <1270793048-23796-8-git-send-email-yinghai@kernel.org> <1271131543.13059.53.camel@pasglop> <4BC3F317.7030702@oracle.com> <1271135239.13059.69.camel@pasglop> In-Reply-To: <1271135239.13059.69.camel@pasglop> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4BC40108.009D:SCFMA4539814,ss=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1595 Lines: 42 On 04/12/2010 10:07 PM, Benjamin Herrenschmidt wrote: > On Mon, 2010-04-12 at 21:29 -0700, Yinghai wrote: >> >>> Haven't you noticed there's already way too many functions walking >> the >>> LMBs ? :-) >> >> x86 is using original lmb_reserve, lmb_free(), but have own version >> lmb_find_area(), and it will be dropped after >> more testing of generic version of lmb_find_area() > > Do -not- add no APIs that are meant to be dropped. They never are in > practice. What I'm saying here is that the LMB code (including existing > stuff) could use some factoring in this area. current generic lmb_find_area() is allocating from high to low. x86 32bit seems have problem with that. in this patchset, it is fixed, but not sure if i missed sth. so could remove x86 lmb_find_area after more test coverage. > >>> >>> I think the ones doing nid alloc could/should be also rewritten to >> use >>> one single low level __lmb_find_* no ? >> >> that nid_alloc() only has one user (sparc64). >> >> maybe could be replaced by lmd_find_area_node(), but need to make sure >> early_node_map[] is filled at first. > > How does it work today ? IE. Which ever mechanism is used that works I > don't care but we shouldn't use 2 different ones. x86 is only use find_area_early() with node area scope, David point that could have problem with cross node mem map. 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/