* Sparsemem: Do not reserve section flags if VMEMMAP is in use
@ 2007-11-13 3:47 Christoph Lameter
2007-11-13 4:46 ` KAMEZAWA Hiroyuki
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Lameter @ 2007-11-13 3:47 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: linux-mm
Sparsemem with virtual memmap does not need the section flags in
the page flags. Do not allocate the bits if they are not needed.
This has the potential of freeing up a lot of page flags if SPARSE
can be made to consistently use a virtual memmap.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
include/linux/mm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/include/linux/mm.h
===================================================================
--- linux-2.6.orig/include/linux/mm.h 2007-11-12 19:36:39.472347109 -0800
+++ linux-2.6/include/linux/mm.h 2007-11-12 19:37:05.197064250 -0800
@@ -378,7 +378,7 @@ static inline void set_compound_order(st
* with space for node: | SECTION | NODE | ZONE | ... | FLAGS |
* no space for node: | SECTION | ZONE | ... | FLAGS |
*/
-#ifdef CONFIG_SPARSEMEM
+#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
#define SECTIONS_WIDTH SECTIONS_SHIFT
#else
#define SECTIONS_WIDTH 0
--
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Sparsemem: Do not reserve section flags if VMEMMAP is in use
2007-11-13 3:47 Sparsemem: Do not reserve section flags if VMEMMAP is in use Christoph Lameter
@ 2007-11-13 4:46 ` KAMEZAWA Hiroyuki
2007-11-13 21:38 ` Christoph Lameter
0 siblings, 1 reply; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2007-11-13 4:46 UTC (permalink / raw)
To: Christoph Lameter; +Cc: Andy Whitcroft, linux-mm
On Mon, 12 Nov 2007 19:47:06 -0800 (PST)
Christoph Lameter <clameter@sgi.com> wrote:
> Index: linux-2.6/include/linux/mm.h
> ===================================================================
> --- linux-2.6.orig/include/linux/mm.h 2007-11-12 19:36:39.472347109 -0800
> +++ linux-2.6/include/linux/mm.h 2007-11-12 19:37:05.197064250 -0800
> @@ -378,7 +378,7 @@ static inline void set_compound_order(st
> * with space for node: | SECTION | NODE | ZONE | ... | FLAGS |
> * no space for node: | SECTION | ZONE | ... | FLAGS |
> */
> -#ifdef CONFIG_SPARSEMEM
> +#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
> #define SECTIONS_WIDTH SECTIONS_SHIFT
> #else
> #define SECTIONS_WIDTH 0
>
I like this. but it may safe to add this definition to do this..
==
#if SECTIONS_WIDTH > 0
static inline page_to_section(struct page *page)
{
return pfn_to_section(page_to_pfn(page));
}
else
....
#endif
==
page_to_section is used in page_to_nid() if NODE_NOT_IN_PAGE_FLAGS=y.
(I'm not sure exact config dependency.)
Thanks,
-Kame
--
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>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Sparsemem: Do not reserve section flags if VMEMMAP is in use
2007-11-13 4:46 ` KAMEZAWA Hiroyuki
@ 2007-11-13 21:38 ` Christoph Lameter
2007-11-14 0:19 ` KAMEZAWA Hiroyuki
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Lameter @ 2007-11-13 21:38 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki; +Cc: Andy Whitcroft, linux-mm
On Tue, 13 Nov 2007, KAMEZAWA Hiroyuki wrote:
> I like this. but it may safe to add this definition to do this..
>
> ==
> #if SECTIONS_WIDTH > 0
> static inline page_to_section(struct page *page)
> {
> return pfn_to_section(page_to_pfn(page));
> }
> else
> ....
> #endif
> ==
Well that is currently not done for !SPARSEMEM configuration where
SECTIONS_WIDTH is also zero. So I left it as is.
> page_to_section is used in page_to_nid() if NODE_NOT_IN_PAGE_FLAGS=y.
> (I'm not sure exact config dependency.)
NODE_NOT_IN_PAGE_FLAGS=y only occurs when flag bits are
taken away by sparsemem for the section bits.
--
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>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Sparsemem: Do not reserve section flags if VMEMMAP is in use
2007-11-13 21:38 ` Christoph Lameter
@ 2007-11-14 0:19 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2007-11-14 0:19 UTC (permalink / raw)
To: Christoph Lameter; +Cc: Andy Whitcroft, linux-mm
On Tue, 13 Nov 2007 13:38:11 -0800 (PST)
Christoph Lameter <clameter@sgi.com> wrote:
> Well that is currently not done for !SPARSEMEM configuration where
> SECTIONS_WIDTH is also zero. So I left it as is.
>
> > page_to_section is used in page_to_nid() if NODE_NOT_IN_PAGE_FLAGS=y.
> > (I'm not sure exact config dependency.)
>
> NODE_NOT_IN_PAGE_FLAGS=y only occurs when flag bits are
> taken away by sparsemem for the section bits.
>
>
Ahh, thank you for confirmation.
Regards,
-Kame
--
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-14 0:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-13 3:47 Sparsemem: Do not reserve section flags if VMEMMAP is in use Christoph Lameter
2007-11-13 4:46 ` KAMEZAWA Hiroyuki
2007-11-13 21:38 ` Christoph Lameter
2007-11-14 0:19 ` KAMEZAWA Hiroyuki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox