All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Subject: [11/14] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86
Date: Thu, 20 Mar 2008 23:17:14 -0700	[thread overview]
Message-ID: <20080321061726.782068299@sgi.com> (raw)
In-Reply-To: 20080321061703.921169367@sgi.com

[-- Attachment #1: 0016-vcompound-Fallbacks-for-order-2-stack-allocations.patch --]
[-- Type: text/plain, Size: 3066 bytes --]

This allows fallback for order 1 stack allocations. In the fallback
scenario the stacks will be virtually mapped.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
 include/asm-ia64/thread_info.h   |    5 +++--
 include/asm-x86/thread_info_32.h |    6 +++---
 include/asm-x86/thread_info_64.h |    4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

Index: linux-2.6.25-rc5-mm1/include/asm-ia64/thread_info.h
===================================================================
--- linux-2.6.25-rc5-mm1.orig/include/asm-ia64/thread_info.h	2008-03-20 20:03:47.165885870 -0700
+++ linux-2.6.25-rc5-mm1/include/asm-ia64/thread_info.h	2008-03-20 20:04:51.302135777 -0700
@@ -82,8 +82,9 @@ struct thread_info {
 #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
 
 #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
-#define alloc_task_struct()	((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER))
-#define free_task_struct(tsk)	free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER)
+#define alloc_task_struct()	((struct task_struct *)__alloc_vcompound( \
+			GFP_KERNEL, KERNEL_STACK_SIZE_ORDER))
+#define free_task_struct(tsk)	__free_vcompound(tsk)
 
 #define tsk_set_notify_resume(tsk) \
 	set_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME)
Index: linux-2.6.25-rc5-mm1/include/asm-x86/thread_info_32.h
===================================================================
--- linux-2.6.25-rc5-mm1.orig/include/asm-x86/thread_info_32.h	2008-03-20 20:03:47.173885951 -0700
+++ linux-2.6.25-rc5-mm1/include/asm-x86/thread_info_32.h	2008-03-20 20:04:51.306136067 -0700
@@ -96,13 +96,13 @@ static inline struct thread_info *curren
 /* thread information allocation */
 #ifdef CONFIG_DEBUG_STACK_USAGE
 #define alloc_thread_info(tsk) ((struct thread_info *) \
-	__get_free_pages(GFP_KERNEL| __GFP_ZERO, get_order(THREAD_SIZE)))
+	__alloc_vcompound(GFP_KERNEL| __GFP_ZERO, get_order(THREAD_SIZE)))
 #else
 #define alloc_thread_info(tsk) ((struct thread_info *) \
-	__get_free_pages(GFP_KERNEL, get_order(THREAD_SIZE)))
+	__alloc_vcompound(GFP_KERNEL, get_order(THREAD_SIZE)))
 #endif
 
-#define free_thread_info(info)	free_pages((unsigned long)(info), get_order(THREAD_SIZE))
+#define free_thread_info(info)	__free_vcompound(info)
 
 #else /* !__ASSEMBLY__ */
 
Index: linux-2.6.25-rc5-mm1/include/asm-x86/thread_info_64.h
===================================================================
--- linux-2.6.25-rc5-mm1.orig/include/asm-x86/thread_info_64.h	2008-03-20 20:03:47.189886138 -0700
+++ linux-2.6.25-rc5-mm1/include/asm-x86/thread_info_64.h	2008-03-20 20:04:51.306136067 -0700
@@ -83,9 +83,9 @@ static inline struct thread_info *stack_
 #endif
 
 #define alloc_thread_info(tsk) \
-	((struct thread_info *) __get_free_pages(THREAD_FLAGS, THREAD_ORDER))
+	((struct thread_info *) __alloc_vcompound(THREAD_FLAGS, THREAD_ORDER))
 
-#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER)
+#define free_thread_info(ti) __free_vcompound(ti)
 
 #else /* !__ASSEMBLY__ */
 

-- 

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Lameter <clameter@sgi.com>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Subject: [11/14] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86
Date: Thu, 20 Mar 2008 23:17:14 -0700	[thread overview]
Message-ID: <20080321061726.782068299@sgi.com> (raw)
In-Reply-To: 20080321061703.921169367@sgi.com

[-- Attachment #1: 0016-vcompound-Fallbacks-for-order-2-stack-allocations.patch --]
[-- Type: text/plain, Size: 3292 bytes --]

This allows fallback for order 1 stack allocations. In the fallback
scenario the stacks will be virtually mapped.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
 include/asm-ia64/thread_info.h   |    5 +++--
 include/asm-x86/thread_info_32.h |    6 +++---
 include/asm-x86/thread_info_64.h |    4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

Index: linux-2.6.25-rc5-mm1/include/asm-ia64/thread_info.h
===================================================================
--- linux-2.6.25-rc5-mm1.orig/include/asm-ia64/thread_info.h	2008-03-20 20:03:47.165885870 -0700
+++ linux-2.6.25-rc5-mm1/include/asm-ia64/thread_info.h	2008-03-20 20:04:51.302135777 -0700
@@ -82,8 +82,9 @@ struct thread_info {
 #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
 
 #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
-#define alloc_task_struct()	((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER))
-#define free_task_struct(tsk)	free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER)
+#define alloc_task_struct()	((struct task_struct *)__alloc_vcompound( \
+			GFP_KERNEL, KERNEL_STACK_SIZE_ORDER))
+#define free_task_struct(tsk)	__free_vcompound(tsk)
 
 #define tsk_set_notify_resume(tsk) \
 	set_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME)
Index: linux-2.6.25-rc5-mm1/include/asm-x86/thread_info_32.h
===================================================================
--- linux-2.6.25-rc5-mm1.orig/include/asm-x86/thread_info_32.h	2008-03-20 20:03:47.173885951 -0700
+++ linux-2.6.25-rc5-mm1/include/asm-x86/thread_info_32.h	2008-03-20 20:04:51.306136067 -0700
@@ -96,13 +96,13 @@ static inline struct thread_info *curren
 /* thread information allocation */
 #ifdef CONFIG_DEBUG_STACK_USAGE
 #define alloc_thread_info(tsk) ((struct thread_info *) \
-	__get_free_pages(GFP_KERNEL| __GFP_ZERO, get_order(THREAD_SIZE)))
+	__alloc_vcompound(GFP_KERNEL| __GFP_ZERO, get_order(THREAD_SIZE)))
 #else
 #define alloc_thread_info(tsk) ((struct thread_info *) \
-	__get_free_pages(GFP_KERNEL, get_order(THREAD_SIZE)))
+	__alloc_vcompound(GFP_KERNEL, get_order(THREAD_SIZE)))
 #endif
 
-#define free_thread_info(info)	free_pages((unsigned long)(info), get_order(THREAD_SIZE))
+#define free_thread_info(info)	__free_vcompound(info)
 
 #else /* !__ASSEMBLY__ */
 
Index: linux-2.6.25-rc5-mm1/include/asm-x86/thread_info_64.h
===================================================================
--- linux-2.6.25-rc5-mm1.orig/include/asm-x86/thread_info_64.h	2008-03-20 20:03:47.189886138 -0700
+++ linux-2.6.25-rc5-mm1/include/asm-x86/thread_info_64.h	2008-03-20 20:04:51.306136067 -0700
@@ -83,9 +83,9 @@ static inline struct thread_info *stack_
 #endif
 
 #define alloc_thread_info(tsk) \
-	((struct thread_info *) __get_free_pages(THREAD_FLAGS, THREAD_ORDER))
+	((struct thread_info *) __alloc_vcompound(THREAD_FLAGS, THREAD_ORDER))
 
-#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER)
+#define free_thread_info(ti) __free_vcompound(ti)
 
 #else /* !__ASSEMBLY__ */
 

-- 

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2008-03-21  6:22 UTC|newest]

Thread overview: 212+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-21  6:17 [00/14] Virtual Compound Page Support V3 Christoph Lameter
2008-03-21  6:17 ` Christoph Lameter
2008-03-21  6:17 ` [01/14] vcompound: Return page array on vunmap Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  6:17 ` [02/14] vcompound: pageflags: Add PageVcompound() Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  6:17 ` [03/14] vmallocinfo: Support display of vcompound for a virtual compound page Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  7:55   ` Eric Dumazet
2008-03-21  7:55     ` Eric Dumazet
2008-03-21 17:32     ` Christoph Lameter
2008-03-21 17:32       ` Christoph Lameter
2008-03-21  6:17 ` [04/14] vcompound: Core piece Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-22 12:10   ` KOSAKI Motohiro
2008-03-22 12:10     ` KOSAKI Motohiro
2008-03-24 18:28     ` Christoph Lameter
2008-03-24 18:28       ` Christoph Lameter
2008-03-21  6:17 ` [05/14] vcompound: Debugging aid Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  6:17 ` [06/14] vcompound: Virtual fallback for sparsemem Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  6:17 ` [07/14] vcompound: bit waitqueue support Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  6:17 ` [08/14] vcompound: Fallback for zone wait table Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  6:17 ` [09/14] vcompound: crypto: Fallback for temporary order 2 allocation Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  6:17 ` [10/14] vcompound: slub: Use for buffer to correlate allocation addresses Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  6:17 ` Christoph Lameter [this message]
2008-03-21  6:17   ` [11/14] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86 Christoph Lameter
2008-03-21  7:25   ` David Miller
2008-03-21  7:25     ` David Miller, Christoph Lameter
2008-03-21  8:39     ` Ingo Molnar
2008-03-21  8:39       ` Ingo Molnar
2008-03-21 17:33       ` Christoph Lameter
2008-03-21 17:33         ` Christoph Lameter
2008-03-21 19:02         ` Ingo Molnar
2008-03-21 19:02           ` Ingo Molnar
2008-03-21 19:04           ` Christoph Lameter
2008-03-21 19:04             ` Christoph Lameter
2008-03-21 17:40     ` Christoph Lameter
2008-03-21 17:40       ` Christoph Lameter
2008-03-21 21:57       ` David Miller
2008-03-21 21:57         ` David Miller, Christoph Lameter
2008-03-24 18:27         ` [11/14] vcompound: Fallbacks for order 1 stack allocations on Christoph Lameter
2008-03-24 18:27           ` [11/14] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86 Christoph Lameter
2008-03-24 18:27           ` Christoph Lameter
2008-03-24 20:37           ` larger default page sizes David Miller
2008-03-24 20:37             ` David Miller, Christoph Lameter
2008-03-24 20:37             ` David Miller
2008-03-24 21:05             ` Christoph Lameter
2008-03-24 21:05               ` Christoph Lameter
2008-03-24 21:05               ` Christoph Lameter
2008-03-24 21:43               ` David Miller
2008-03-24 21:43                 ` David Miller, Christoph Lameter
2008-03-24 21:43                 ` David Miller
2008-03-25 17:48                 ` Christoph Lameter
2008-03-25 17:48                   ` Christoph Lameter
2008-03-25 17:48                   ` Christoph Lameter
2008-03-25 23:22                   ` David Miller
2008-03-25 23:22                     ` David Miller, Christoph Lameter
2008-03-25 23:22                     ` David Miller
2008-03-25 23:41                     ` Peter Chubb
2008-03-25 23:41                       ` Peter Chubb
2008-03-25 23:41                       ` Peter Chubb
2008-03-25 23:49                       ` David Miller
2008-03-25 23:49                         ` David Miller, Peter Chubb
2008-03-25 23:49                         ` David Miller
2008-03-26  0:25                         ` Peter Chubb
2008-03-26  0:25                           ` Peter Chubb
2008-03-26  0:25                           ` Peter Chubb
2008-03-26  0:31                           ` David Miller
2008-03-26  0:31                             ` David Miller, Peter Chubb
2008-03-26  0:31                             ` David Miller
2008-03-26  0:34                       ` David Mosberger-Tang
2008-03-26  0:34                         ` David Mosberger-Tang
2008-03-26  0:34                         ` David Mosberger-Tang
2008-03-26  0:39                         ` David Miller
2008-03-26  0:39                           ` David Miller, David Mosberger-Tang
2008-03-26  0:39                           ` David Miller
2008-03-26  0:57                         ` Peter Chubb
2008-03-26  0:57                           ` Peter Chubb
2008-03-26  0:57                           ` Peter Chubb
2008-03-26  4:16                           ` John Marvin
2008-03-26  4:16                             ` John Marvin
2008-03-26  4:16                             ` John Marvin
2008-03-26  4:36                             ` David Miller
2008-03-26  4:36                               ` David Miller, John Marvin
2008-03-26  4:36                               ` David Miller
2008-03-24 21:25             ` Luck, Tony
2008-03-24 21:25               ` Luck, Tony
2008-03-24 21:25               ` Luck, Tony
2008-03-24 21:46               ` David Miller
2008-03-24 21:46                 ` David Miller, Luck, Tony
2008-03-24 21:46                 ` David Miller
2008-03-25  3:29             ` Paul Mackerras
2008-03-25  3:29               ` Paul Mackerras
2008-03-25  3:29               ` Paul Mackerras
2008-03-25  4:15               ` David Miller
2008-03-25  4:15                 ` David Miller, Paul Mackerras
2008-03-25  4:15                 ` David Miller
2008-03-25 11:50                 ` Paul Mackerras
2008-03-25 11:50                   ` Paul Mackerras
2008-03-25 11:50                   ` Paul Mackerras
2008-03-25 23:32                   ` David Miller
2008-03-25 23:32                     ` David Miller, Paul Mackerras
2008-03-25 23:32                     ` David Miller
2008-03-25 23:49                     ` Luck, Tony
2008-03-25 23:49                       ` Luck, Tony
2008-03-25 23:49                       ` Luck, Tony
2008-03-26  0:16                       ` David Miller
2008-03-26  0:16                         ` David Miller, Luck, Tony
2008-03-26  0:16                         ` David Miller
2008-03-26 15:54                       ` Nish Aravamudan
2008-03-26 15:54                         ` Nish Aravamudan
2008-03-26 15:54                         ` Nish Aravamudan
2008-03-26 17:05                         ` Luck, Tony
2008-03-26 17:05                           ` Luck, Tony
2008-03-26 17:05                           ` Luck, Tony
2008-03-26 18:54                           ` Mel Gorman
2008-03-26 18:54                             ` Mel Gorman
2008-03-25 12:05               ` Andi Kleen
2008-03-25 12:05                 ` Andi Kleen
2008-03-25 12:05                 ` Andi Kleen
2008-03-25 21:27                 ` Paul Mackerras
2008-03-25 21:27                   ` Paul Mackerras
2008-03-25 21:27                   ` Paul Mackerras
2008-03-26  5:24                 ` Paul Mackerras
2008-03-26  5:24                   ` Paul Mackerras
2008-03-26  5:24                   ` Paul Mackerras
2008-03-26 15:59                   ` Linus Torvalds
2008-03-26 15:59                     ` Linus Torvalds
2008-03-26 15:59                     ` Linus Torvalds
2008-03-27  1:08                     ` Paul Mackerras
2008-03-27  1:08                       ` Paul Mackerras
2008-03-27  1:08                       ` Paul Mackerras
2008-03-26 17:56                   ` Christoph Lameter
2008-03-26 17:56                     ` Christoph Lameter
2008-03-26 17:56                     ` Christoph Lameter
2008-03-26 23:21                     ` David Miller
2008-03-26 23:21                       ` David Miller, Christoph Lameter
2008-03-26 23:21                       ` David Miller
2008-03-27  3:00                     ` Paul Mackerras
2008-03-27  3:00                       ` Paul Mackerras
2008-03-27  3:00                       ` Paul Mackerras
2008-03-25 18:27               ` Dave Hansen
2008-03-25 18:27                 ` Dave Hansen
2008-03-25 18:27                 ` Dave Hansen
2008-03-24 21:13           ` [11/14] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86 Luck, Tony
2008-03-24 21:13             ` Luck, Tony
2008-03-24 21:13             ` Luck, Tony
2008-03-25 17:42             ` [11/14] vcompound: Fallbacks for order 1 stack allocations on Christoph Lameter
2008-03-25 17:42               ` [11/14] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86 Christoph Lameter
2008-03-25 17:42               ` Christoph Lameter
2008-03-25 19:09               ` Luck, Tony
2008-03-25 19:09                 ` Luck, Tony
2008-03-25 19:09                 ` Luck, Tony
2008-03-25 19:25                 ` [11/14] vcompound: Fallbacks for order 1 stack allocations on Christoph Lameter
2008-03-25 19:25                   ` [11/14] vcompound: Fallbacks for order 1 stack allocations on IA64 and x86 Christoph Lameter
2008-03-25 19:25                   ` Christoph Lameter
2008-03-21 22:30   ` Andi Kleen
2008-03-21 22:30     ` Andi Kleen
2008-03-24 19:53     ` Christoph Lameter
2008-03-24 19:53       ` Christoph Lameter
2008-03-25  7:51       ` Andi Kleen
2008-03-25  7:51         ` Andi Kleen
2008-03-25 17:55         ` Christoph Lameter
2008-03-25 17:55           ` Christoph Lameter
2008-03-25 18:07           ` Andi Kleen
2008-03-25 18:07             ` Andi Kleen
2008-03-21  6:17 ` [12/14] vcompound: Avoid vmalloc in e1000 driver Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21 17:27   ` Kok, Auke
2008-03-21 17:27     ` Kok, Auke
2008-03-21  6:17 ` [13/14] vcompound: Use vcompound for swap_map Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21 21:25   ` Andi Kleen
2008-03-21 21:25     ` Andi Kleen
2008-03-21 21:33     ` Christoph Lameter
2008-03-21 21:33       ` Christoph Lameter
2008-03-24 19:54     ` Christoph Lameter
2008-03-24 19:54       ` Christoph Lameter
2008-03-25  7:52       ` Andi Kleen
2008-03-25  7:52         ` Andi Kleen
2008-03-25 17:45         ` Christoph Lameter
2008-03-25 17:45           ` Christoph Lameter
2008-03-25 17:55           ` Andi Kleen
2008-03-25 17:55             ` Andi Kleen
2008-03-25 17:51             ` Christoph Lameter
2008-03-25 17:51               ` Christoph Lameter
2008-03-21  6:17 ` [14/14] vcompound: Avoid vmalloc for ehash_locks Christoph Lameter
2008-03-21  6:17   ` Christoph Lameter
2008-03-21  7:02   ` Eric Dumazet
2008-03-21  7:02     ` Eric Dumazet
2008-03-21  7:03     ` Christoph Lameter
2008-03-21  7:03       ` Christoph Lameter
2008-03-21  7:31       ` David Miller
2008-03-21  7:31         ` David Miller, Christoph Lameter
2008-03-21  7:42         ` Eric Dumazet
2008-03-21  7:42           ` Eric Dumazet
2008-03-21  7:31     ` David Miller
2008-03-21  7:31       ` David Miller, Eric Dumazet
2008-03-21 17:31       ` Christoph Lameter
2008-03-21 17:31         ` Christoph Lameter
2008-03-22 18:40 ` [00/14] Virtual Compound Page Support V3 Arjan van de Ven
2008-03-22 18:40   ` Arjan van de Ven
2008-03-24 18:31   ` Christoph Lameter
2008-03-24 18:31     ` Christoph Lameter
2008-03-24 19:29     ` Christoph Lameter
2008-03-24 19:29       ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080321061726.782068299@sgi.com \
    --to=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.