linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]  no buddy bitmap patch : intro and includes [0/2]
@ 2004-10-07 12:22 Hiroyuki KAMEZAWA
  2004-10-07 14:45 ` Martin J. Bligh
  0 siblings, 1 reply; 4+ messages in thread
From: Hiroyuki KAMEZAWA @ 2004-10-07 12:22 UTC (permalink / raw)
  To: Linux Kernel ML
  Cc: linux-mm, LHMS, Andrew Morton, William Lee Irwin III, Luck, Tony,
	Dave Hansen, Hirokazu Takahashi

Hi,

Followings are patches for removing bitmaps from buddy allocator, against 2.6.9-rc3.
I think this version is much clearer than ones I posted a month ago.

The problem I was worried about was how to deal with memmap's holes in a zone.
and I decided to use pfn_valid() simply. Now, there is no messy codes :)

pfn_valid() is used when macro "HOLES_IN_ZONE" is defined.
It is defined only in ia64 now.

Here is kernbench result on my tiger4 (Itanium2 1.3GHz x2, 8 Gbytes memory)

Average Optimal -j 8 Load Run (Perfroming 5 run of make -j 8 on linux-2.6.8 source tree):

                Elapsed Time  User Time  System Time Percent CPU  Context Switches   Sleeps
2.6.9-rc3         699.906      1322.01     39.336       194            64390         74416.8
no-bitmap         698.334      1321.79     38.58        194.2          64435.4       74622.2

If there is unclear point, please tell me.

Thanks.
Kame <kamezawa.hiroyu@jp.fujitsu.com>

=== patch for include files ===

This patch removes bitmap from zone->free_area[] in include/linux/mmzone.h,
and adds some comments on page->private field in include/linux/mm.h.

non-atomic ops for changing PG_private bit is added in include/page-flags.h.
zone->lock is always acquired when PG_private of "a free page" is changed.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>


---

 test-kernel-kamezawa/include/linux/mm.h         |    2 ++
 test-kernel-kamezawa/include/linux/mmzone.h     |    1 -
 test-kernel-kamezawa/include/linux/page-flags.h |    2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff -puN include/linux/mm.h~eliminate-bitmap-includes include/linux/mm.h
--- test-kernel/include/linux/mm.h~eliminate-bitmap-includes	2004-10-07 17:18:34.062982800 +0900
+++ test-kernel-kamezawa/include/linux/mm.h	2004-10-07 17:18:34.070981584 +0900
@@ -209,6 +209,8 @@ struct page {
 					 * usually used for buffer_heads
 					 * if PagePrivate set; used for
 					 * swp_entry_t if PageSwapCache
+					 * When page is free, this indicates
+					 * order in the buddy system.
 					 */
 	struct address_space *mapping;	/* If low bit clear, points to
 					 * inode address_space, or NULL.
diff -puN include/linux/mmzone.h~eliminate-bitmap-includes include/linux/mmzone.h
--- test-kernel/include/linux/mmzone.h~eliminate-bitmap-includes	2004-10-07 17:18:34.065982344 +0900
+++ test-kernel-kamezawa/include/linux/mmzone.h	2004-10-07 17:18:34.071981432 +0900
@@ -22,7 +22,6 @@

 struct free_area {
 	struct list_head	free_list;
-	unsigned long		*map;
 };

 struct pglist_data;
diff -puN include/linux/page-flags.h~eliminate-bitmap-includes include/linux/page-flags.h
--- test-kernel/include/linux/page-flags.h~eliminate-bitmap-includes	2004-10-07 17:18:34.067982040 +0900
+++ test-kernel-kamezawa/include/linux/page-flags.h	2004-10-07 17:18:34.071981432 +0900
@@ -238,6 +238,8 @@ extern unsigned long __read_page_state(u
 #define SetPagePrivate(page)	set_bit(PG_private, &(page)->flags)
 #define ClearPagePrivate(page)	clear_bit(PG_private, &(page)->flags)
 #define PagePrivate(page)	test_bit(PG_private, &(page)->flags)
+#define __SetPagePrivate(page)  __set_bit(PG_private, &(page)->flags)
+#define __ClearPagePrivate(page) __clear_bit(PG_private, &(page)->flags)

 #define PageWriteback(page)	test_bit(PG_writeback, &(page)->flags)
 #define SetPageWriteback(page)						\

_

--
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:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]  no buddy bitmap patch : intro and includes [0/2]
  2004-10-07 12:22 [PATCH] no buddy bitmap patch : intro and includes [0/2] Hiroyuki KAMEZAWA
@ 2004-10-07 14:45 ` Martin J. Bligh
  2004-10-07 15:59   ` [Lhms-devel] " Dave McCracken
  0 siblings, 1 reply; 4+ messages in thread
From: Martin J. Bligh @ 2004-10-07 14:45 UTC (permalink / raw)
  To: Hiroyuki KAMEZAWA, Linux Kernel ML
  Cc: linux-mm, LHMS, Andrew Morton, William Lee Irwin III, Luck, Tony,
	Dave Hansen, Hirokazu Takahashi

> Followings are patches for removing bitmaps from buddy allocator, against 2.6.9-rc3.
> I think this version is much clearer than ones I posted a month ago.
...
> If there is unclear point, please tell me.

What was the purpose behind this, again? Sorry, has been too long since
I last looked.

M.

--
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:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Lhms-devel] Re: [PATCH]  no buddy bitmap patch : intro and includes [0/2]
  2004-10-07 14:45 ` Martin J. Bligh
@ 2004-10-07 15:59   ` Dave McCracken
  0 siblings, 0 replies; 4+ messages in thread
From: Dave McCracken @ 2004-10-07 15:59 UTC (permalink / raw)
  To: Martin J. Bligh
  Cc: Hiroyuki KAMEZAWA, Linux Kernel ML, linux-mm, LHMS,
	Andrew Morton, William Lee Irwin III, Luck, Tony, Dave Hansen,
	Hirokazu Takahashi

--On Thursday, October 07, 2004 07:45:21 -0700 "Martin J. Bligh"
<mbligh@aracnet.com> wrote:

>> Followings are patches for removing bitmaps from buddy allocator,
>> against 2.6.9-rc3. I think this version is much clearer than ones I
>> posted a month ago.
> ...
>> If there is unclear point, please tell me.
> 
> What was the purpose behind this, again? Sorry, has been too long since
> I last looked.

The memory allocator bitmaps are the main remaining reason we need the
concept of linear memory.  If we can get rid of them, it's one step closer
to managing memory as a set of sections.

Dave McCracken

--
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:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [Lhms-devel] Re: [PATCH]  no buddy bitmap patch : intro and includes [0/2]
@ 2004-10-07 15:03 Tolentino, Matthew E
  0 siblings, 0 replies; 4+ messages in thread
From: Tolentino, Matthew E @ 2004-10-07 15:03 UTC (permalink / raw)
  To: Martin J. Bligh, Hiroyuki KAMEZAWA, Linux Kernel ML
  Cc: linux-mm, LHMS, Andrew Morton, William Lee Irwin III, Luck, Tony,
	Dave Hansen, Hirokazu Takahashi

>> Followings are patches for removing bitmaps from buddy 
>allocator, against 2.6.9-rc3.
>> I think this version is much clearer than ones I posted a month ago.
>...
>> If there is unclear point, please tell me.
>
>What was the purpose behind this, again? Sorry, has been too long since
>I last looked.
>

For one, it avoids the otherwise requisite resizing of the bitmaps 
during memory hotplug operations...

matt
--
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:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-07 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-07 12:22 [PATCH] no buddy bitmap patch : intro and includes [0/2] Hiroyuki KAMEZAWA
2004-10-07 14:45 ` Martin J. Bligh
2004-10-07 15:59   ` [Lhms-devel] " Dave McCracken
2004-10-07 15:03 Tolentino, Matthew E

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox