From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1I0ifJ-0005ZD-Fp for user-mode-linux-devel@lists.sourceforge.net; Tue, 19 Jun 2007 11:42:57 -0700 Received: from saraswathi.solana.com ([198.99.130.12]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1I0ifH-0001TD-Q0 for user-mode-linux-devel@lists.sourceforge.net; Tue, 19 Jun 2007 11:42:57 -0700 Date: Tue, 19 Jun 2007 14:42:45 -0400 From: Jeff Dike Message-ID: <20070619184245.GA10562@c2.user-mode-linux.org> Mime-Version: 1.0 Content-Disposition: inline Subject: [uml-devel] [PATCH 1/2] UML - Use get_free_pages to allocate kernel stacks List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: user-mode-linux-devel-bounces@lists.sourceforge.net Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net To: Andrew Morton Cc: LKML , uml-devel For some reason, I was using kmalloc instead of get_free_pages for kernel stacks. Signed-off-by: Jeff Dike -- include/asm-um/thread_info.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Index: linux-2.6.21-mm/include/asm-um/thread_info.h =================================================================== --- linux-2.6.21-mm.orig/include/asm-um/thread_info.h 2007-06-19 12:23:16.000000000 -0400 +++ linux-2.6.21-mm/include/asm-um/thread_info.h 2007-06-19 14:06:36.000000000 -0400 @@ -54,8 +54,10 @@ static inline struct thread_info *curren /* thread information allocation */ #define alloc_thread_info(tsk) \ - ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) -#define free_thread_info(ti) kfree(ti) + ((struct thread_info *) __get_free_pages(GFP_KERNEL, \ + CONFIG_KERNEL_STACK_ORDER)) +#define free_thread_info(ti) \ + free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER) #endif ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762441AbXFSSnn (ORCPT ); Tue, 19 Jun 2007 14:43:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762260AbXFSSnQ (ORCPT ); Tue, 19 Jun 2007 14:43:16 -0400 Received: from saraswathi.solana.com ([198.99.130.12]:53314 "EHLO saraswathi.solana.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762231AbXFSSnP (ORCPT ); Tue, 19 Jun 2007 14:43:15 -0400 Date: Tue, 19 Jun 2007 14:42:45 -0400 From: Jeff Dike To: Andrew Morton Cc: LKML , uml-devel Subject: [PATCH 1/2] UML - Use get_free_pages to allocate kernel stacks Message-ID: <20070619184245.GA10562@c2.user-mode-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org For some reason, I was using kmalloc instead of get_free_pages for kernel stacks. Signed-off-by: Jeff Dike -- include/asm-um/thread_info.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Index: linux-2.6.21-mm/include/asm-um/thread_info.h =================================================================== --- linux-2.6.21-mm.orig/include/asm-um/thread_info.h 2007-06-19 12:23:16.000000000 -0400 +++ linux-2.6.21-mm/include/asm-um/thread_info.h 2007-06-19 14:06:36.000000000 -0400 @@ -54,8 +54,10 @@ static inline struct thread_info *curren /* thread information allocation */ #define alloc_thread_info(tsk) \ - ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) -#define free_thread_info(ti) kfree(ti) + ((struct thread_info *) __get_free_pages(GFP_KERNEL, \ + CONFIG_KERNEL_STACK_ORDER)) +#define free_thread_info(ti) \ + free_pages((unsigned long)(ti),CONFIG_KERNEL_STACK_ORDER) #endif