Thread (3 messages) 3 messages, 2 authors, 2004-08-31

Re: [Lhms-devel] Re: [RFC] buddy allocator withou bitmap(2) [3/3]

From: Hiroyuki KAMEZAWA <hidden>
Date: 2004-08-31 23:06:20
Also in: lkml

Dave Hansen wrote:
On Tue, 2004-08-31 at 03:47, Hiroyuki KAMEZAWA wrote:
quoted
"Does a page's buddy page exist or not ?" is checked by following.
------------------------
if ((address of buddy is smaller than that of page) &&
   (page->flags & PG_buddyend))
   this page has no buddy in this order.
------------------------

What about the top-of-the-zone buddyend pages?  Are those covered
elsewhere?
If zone is not aligned to MAX_ORDER, the top-of-the-zone buddyend pages
are marked as PG_buddyend.
I forget something ?


quoted
+static inline int page_is_buddy(struct page *page, int order)
+{
+	if (PagePrivate(page) &&
+	    (page_order(page) == order) &&
+	    !(page->flags & (1 << PG_reserved)) &&

Please use a macro.
my mistake.
quoted
	if (order)
		destroy_compound_page(page, order);
+
	mask = (~0UL) << order;
	page_idx = page - base;

Repeat after me: No whitespace changes.  No whitespace changes.  No
whitespace changes.
very sorry ;(


-- 
--the clue is these footmarks leading to the door.--
KAMEZAWA Hiroyuki [off-list ref]

--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help