From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e32.co.us.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 15F2FB6EE8 for ; Sat, 2 Oct 2010 04:56:59 +1000 (EST) Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e32.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o91ImBMW016234 for ; Fri, 1 Oct 2010 12:48:11 -0600 Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id o91Iuveo259018 for ; Fri, 1 Oct 2010 12:56:57 -0600 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o91IuuBj009046 for ; Fri, 1 Oct 2010 12:56:57 -0600 Message-ID: <4CA62EF6.8000204@austin.ibm.com> Date: Fri, 01 Oct 2010 13:56:54 -0500 From: Nathan Fontenot MIME-Version: 1.0 To: Robin Holt Subject: Re: [PATCH 4/9] v3 Allow memory blocks to span multiple memory sections References: <4CA62700.7010809@austin.ibm.com> <4CA62917.80008@austin.ibm.com> <20101001185250.GK14064@sgi.com> In-Reply-To: <20101001185250.GK14064@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Cc: Greg KH , steiner@sgi.com, linux-kernel@vger.kernel.org, Dave Hansen , linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, KAMEZAWA Hiroyuki List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 10/01/2010 01:52 PM, Robin Holt wrote: > On Fri, Oct 01, 2010 at 01:31:51PM -0500, Nathan Fontenot wrote: >> Update the memory sysfs code such that each sysfs memory directory is now >> considered a memory block that can span multiple memory sections per >> memory block. The default size of each memory block is SECTION_SIZE_BITS >> to maintain the current behavior of having a single memory section per >> memory block (i.e. one sysfs directory per memory section). >> >> For architectures that want to have memory blocks span multiple >> memory sections they need only define their own memory_block_size_bytes() >> routine. >> >> Signed-off-by: Nathan Fontenot >> >> --- >> drivers/base/memory.c | 155 ++++++++++++++++++++++++++++++++++---------------- >> 1 file changed, 108 insertions(+), 47 deletions(-) >> >> Index: linux-next/drivers/base/memory.c >> =================================================================== >> --- linux-next.orig/drivers/base/memory.c 2010-09-30 14:13:50.000000000 -0500 >> +++ linux-next/drivers/base/memory.c 2010-09-30 14:46:00.000000000 -0500 > ... >> +static unsigned long get_memory_block_size(void) >> +{ >> + u32 block_sz; > ^^^ > > I think this should be unsigned long. u32 will work, but everything > else has been changed to use unsigned long. If you disagree, I will > happily acquiesce as nothing is currently broken. If SGI decides to make > memory_block_size_bytes more dynamic, we will fix this up at that time. You're right, that should have been made an unsigned long also. I'll attach a new patch with that corrected. -Nathan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755310Ab0JAS5A (ORCPT ); Fri, 1 Oct 2010 14:57:00 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:58803 "EHLO e33.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754866Ab0JAS47 (ORCPT ); Fri, 1 Oct 2010 14:56:59 -0400 Message-ID: <4CA62EF6.8000204@austin.ibm.com> Date: Fri, 01 Oct 2010 13:56:54 -0500 From: Nathan Fontenot User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: Robin Holt CC: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, Greg KH , Dave Hansen , KAMEZAWA Hiroyuki , steiner@sgi.com Subject: Re: [PATCH 4/9] v3 Allow memory blocks to span multiple memory sections References: <4CA62700.7010809@austin.ibm.com> <4CA62917.80008@austin.ibm.com> <20101001185250.GK14064@sgi.com> In-Reply-To: <20101001185250.GK14064@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/01/2010 01:52 PM, Robin Holt wrote: > On Fri, Oct 01, 2010 at 01:31:51PM -0500, Nathan Fontenot wrote: >> Update the memory sysfs code such that each sysfs memory directory is now >> considered a memory block that can span multiple memory sections per >> memory block. The default size of each memory block is SECTION_SIZE_BITS >> to maintain the current behavior of having a single memory section per >> memory block (i.e. one sysfs directory per memory section). >> >> For architectures that want to have memory blocks span multiple >> memory sections they need only define their own memory_block_size_bytes() >> routine. >> >> Signed-off-by: Nathan Fontenot >> >> --- >> drivers/base/memory.c | 155 ++++++++++++++++++++++++++++++++++---------------- >> 1 file changed, 108 insertions(+), 47 deletions(-) >> >> Index: linux-next/drivers/base/memory.c >> =================================================================== >> --- linux-next.orig/drivers/base/memory.c 2010-09-30 14:13:50.000000000 -0500 >> +++ linux-next/drivers/base/memory.c 2010-09-30 14:46:00.000000000 -0500 > ... >> +static unsigned long get_memory_block_size(void) >> +{ >> + u32 block_sz; > ^^^ > > I think this should be unsigned long. u32 will work, but everything > else has been changed to use unsigned long. If you disagree, I will > happily acquiesce as nothing is currently broken. If SGI decides to make > memory_block_size_bytes more dynamic, we will fix this up at that time. You're right, that should have been made an unsigned long also. I'll attach a new patch with that corrected. -Nathan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with ESMTP id 3D4546B0078 for ; Fri, 1 Oct 2010 14:57:01 -0400 (EDT) Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e34.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o91IlTgU013286 for ; Fri, 1 Oct 2010 12:47:29 -0600 Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o91IuuDa124722 for ; Fri, 1 Oct 2010 12:56:56 -0600 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o91IuuBf009046 for ; Fri, 1 Oct 2010 12:56:56 -0600 Message-ID: <4CA62EF6.8000204@austin.ibm.com> Date: Fri, 01 Oct 2010 13:56:54 -0500 From: Nathan Fontenot MIME-Version: 1.0 Subject: Re: [PATCH 4/9] v3 Allow memory blocks to span multiple memory sections References: <4CA62700.7010809@austin.ibm.com> <4CA62917.80008@austin.ibm.com> <20101001185250.GK14064@sgi.com> In-Reply-To: <20101001185250.GK14064@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Robin Holt Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, Greg KH , Dave Hansen , KAMEZAWA Hiroyuki , steiner@sgi.com List-ID: On 10/01/2010 01:52 PM, Robin Holt wrote: > On Fri, Oct 01, 2010 at 01:31:51PM -0500, Nathan Fontenot wrote: >> Update the memory sysfs code such that each sysfs memory directory is now >> considered a memory block that can span multiple memory sections per >> memory block. The default size of each memory block is SECTION_SIZE_BITS >> to maintain the current behavior of having a single memory section per >> memory block (i.e. one sysfs directory per memory section). >> >> For architectures that want to have memory blocks span multiple >> memory sections they need only define their own memory_block_size_bytes() >> routine. >> >> Signed-off-by: Nathan Fontenot >> >> --- >> drivers/base/memory.c | 155 ++++++++++++++++++++++++++++++++++---------------- >> 1 file changed, 108 insertions(+), 47 deletions(-) >> >> Index: linux-next/drivers/base/memory.c >> =================================================================== >> --- linux-next.orig/drivers/base/memory.c 2010-09-30 14:13:50.000000000 -0500 >> +++ linux-next/drivers/base/memory.c 2010-09-30 14:46:00.000000000 -0500 > ... >> +static unsigned long get_memory_block_size(void) >> +{ >> + u32 block_sz; > ^^^ > > I think this should be unsigned long. u32 will work, but everything > else has been changed to use unsigned long. If you disagree, I will > happily acquiesce as nothing is currently broken. If SGI decides to make > memory_block_size_bytes more dynamic, we will fix this up at that time. You're right, that should have been made an unsigned long also. I'll attach a new patch with that corrected. -Nathan -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org