linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hiroyuki KAMEZAWA <kamezawa.hiroyu@jp.fujitsu.com>
To: Linux Kernel ML <linux-kernel@vger.kernel.org>
Cc: LHMS <lhms-devel@lists.sourceforge.net>,
	linux-mm <linux-mm@kvack.org>,
	William Lee Irwin III <wli@holomorphy.com>,
	Dave Hansen <haveblue@us.ibm.com>
Subject: [RFC] buddy allocator without bitmap [4/4]
Date: Thu, 26 Aug 2004 21:15:14 +0900	[thread overview]
Message-ID: <412DD452.1090703@jp.fujitsu.com> (raw)

This patch 5th inserts prefetch().
I think These prefetch are reasonable and helpful.

-- Kame
====================================================================



---

  linux-2.6.8.1-mm4-kame-kamezawa/mm/page_alloc.c |    2 ++
  1 files changed, 2 insertions(+)

diff -puN mm/page_alloc.c~eliminate-bitmap-prefetch mm/page_alloc.c
--- linux-2.6.8.1-mm4-kame/mm/page_alloc.c~eliminate-bitmap-prefetch	2004-08-26 19:32:01.598461736 +0900
+++ linux-2.6.8.1-mm4-kame-kamezawa/mm/page_alloc.c	2004-08-26 19:32:01.602461128 +0900
@@ -257,6 +257,7 @@ static inline void __free_pages_bulk (st
  		order++;
  		mask <<= 1;
  		page_idx &= mask;
+		prefetch(base + (page_idx ^ (1 << order)));
  		list_del(&buddy->lru);
  		/* for propriety of PG_private bit, we clear it */
  		buddy->flags &= ~(1 << PG_private);
@@ -360,6 +361,7 @@ expand(struct zone *zone, struct page *p
  		area--;
  		high--;
  		size >>= 1;
+		prefetch(&page[size >> 1]);
  		BUG_ON(bad_range(zone, &page[size]));
  		list_add(&page[size].lru, &area->free_list);
  		page[size].flags |= (1 << PG_private);

_

--
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>

             reply	other threads:[~2004-08-26 12:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-26 12:15 Hiroyuki KAMEZAWA [this message]
2004-08-26 15:54 ` Dave Hansen

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=412DD452.1090703@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=haveblue@us.ibm.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=wli@holomorphy.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox