From: Ray Bryant <raybry@sgi.com>
To: Marcello Tosatti <marcelo.tosatti@cyclades.com>,
Hirokazu Takahashi <taka@valinux.co.jp>
Cc: linux-mm <linux-mm@kvack.org>
Subject: Re: migration cache, updated
Date: Mon, 03 Jan 2005 13:25:46 -0600 [thread overview]
Message-ID: <41D99C3A.5090400@sgi.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]
Marcello and Takahashi-san,
In working with your migration cache patch, I found out that
if CONFIG_MIGRATE_MEMORY is not set, then the kernel with your patch
applied (on top of my "split out" version of the memory migration
code from the hotplug patch) doesn't link. (It still expects
migration_space, etc to be defined as externals, and these aren't
defined if CONFIG_MIGRATE_MEMORY is not set.)
Now I realize your patch is probably not "final" (there are a couple
of FIXME's still in there....), but I found the attached patch
useful as it lets my patched kernel compile with or without
CONFIG_MEMORY_MIGRATE set.
I hope you find this useful and will incorporate it into your
migration cache patch.
--
Best Regards,
Ray
-----------------------------------------------
Ray Bryant
512-453-9679 (work) 512-507-7807 (cell)
raybry@sgi.com raybry@austin.rr.com
The box said: "Requires Windows 98 or better",
so I installed Linux.
-----------------------------------------------
[-- Attachment #2: migration_cache_update_fix_link.patch --]
[-- Type: text/plain, Size: 2120 bytes --]
Fix the migration cache patch so that it will link even if
CONFIG_MEMORY_MIGRATE is not set.
Signed-off-by:Ray Bryant <raybry@sgi.com>
Index: linux-2.6.10-rc2-mm4-page-migration-only/include/linux/mm.h
===================================================================
--- linux-2.6.10-rc2-mm4-page-migration-only.orig/include/linux/mm.h 2004-12-29 09:30:00.000000000 -0800
+++ linux-2.6.10-rc2-mm4-page-migration-only/include/linux/mm.h 2004-12-29 09:33:46.000000000 -0800
@@ -279,6 +279,7 @@ struct page {
#include <linux/swap.h>
#include <linux/swapops.h>
+#ifdef CONFIG_MEMORY_MIGRATE
static inline int PageMigration(struct page *page)
{
swp_entry_t entry;
@@ -293,7 +294,9 @@ static inline int PageMigration(struct p
return 1;
}
-
+#else
+#define PageMigration(p) 0
+#endif /* CONFIG_MEMORY_MIGRATE */
/*
* Methods to modify the page usage count.
@@ -506,9 +509,13 @@ static inline struct address_space *page
{
struct address_space *mapping = page->mapping;
+#ifdef CONFIG_MEMORY_MIGRATE
if (unlikely(PageMigration(page)))
mapping = &migration_space;
else if (unlikely(PageSwapCache(page)))
+#else
+ if (unlikely(PageSwapCache(page)))
+#endif
mapping = &swapper_space;
else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
mapping = NULL;
Index: linux-2.6.10-rc2-mm4-page-migration-only/include/linux/swapops.h
===================================================================
--- linux-2.6.10-rc2-mm4-page-migration-only.orig/include/linux/swapops.h 2004-12-29 09:30:00.000000000 -0800
+++ linux-2.6.10-rc2-mm4-page-migration-only/include/linux/swapops.h 2004-12-29 09:36:30.000000000 -0800
@@ -70,6 +70,7 @@ static inline pte_t swp_entry_to_pte(swp
return __swp_entry_to_pte(arch_entry);
}
+#ifdef CONFIG_MEMORY_MIGRATE
static inline int pte_is_migration(pte_t pte)
{
unsigned long swp_type;
@@ -81,6 +82,9 @@ static inline int pte_is_migration(pte_t
return swp_type == MIGRATION_TYPE;
}
+#else
+#define pte_is_migration(x) 0
+#endif /* CONFIG_MEMORY_MIGRATE */
static inline pte_t migration_entry_to_pte(swp_entry_t entry)
{
next reply other threads:[~2005-01-03 19:25 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-03 19:25 Ray Bryant [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-02-06 2:02 Marcelo Tosatti
2005-01-03 19:04 page migration Ray Bryant
2005-01-03 19:37 ` Dave Hansen
2005-01-03 20:15 ` Ray Bryant
2005-01-04 14:42 ` Hirokazu Takahashi
2005-01-04 17:30 ` Ray Bryant
2005-01-04 17:40 ` process " Dave Hansen
2005-01-04 18:26 ` Ray Bryant
2005-01-07 16:57 ` migration cache, updated Ray Bryant
2005-01-10 10:07 ` Marcelo Tosatti
2004-10-25 21:39 Marcelo Tosatti
2004-10-26 1:17 ` Hiroyuki KAMEZAWA
2004-10-26 12:01 ` Marcelo Tosatti
2004-10-26 23:47 ` Hiroyuki KAMEZAWA
2004-10-26 6:37 ` Hirokazu Takahashi
2004-10-26 9:20 ` Marcelo Tosatti
2004-10-26 13:45 ` Hirokazu Takahashi
2004-10-26 11:41 ` Marcelo Tosatti
2004-10-27 13:40 ` Hirokazu Takahashi
2004-10-26 9:15 ` Hirokazu Takahashi
2004-10-26 9:25 ` Marcelo Tosatti
2004-10-26 14:01 ` Hirokazu Takahashi
2004-10-26 12:24 ` Marcelo Tosatti
2004-10-27 7:25 ` IWAMOTO Toshihiro
2004-10-27 16:27 ` Marcelo Tosatti
2004-10-27 13:48 ` Hirokazu Takahashi
2004-10-28 15:19 ` Marcelo Tosatti
2004-10-28 16:05 ` Marcelo Tosatti
2004-10-28 18:51 ` Dave Hansen
2004-10-28 16:26 ` Marcelo Tosatti
2004-10-28 20:24 ` Dave Hansen
2004-11-03 15:21 ` Marcelo Tosatti
2004-11-04 8:01 ` Hirokazu Takahashi
2004-11-05 13:49 ` Hirokazu Takahashi
2004-11-05 15:16 ` Marcelo Tosatti
2004-11-16 4:07 ` Hirokazu Takahashi
2004-11-23 12:14 ` Marcelo Tosatti
2004-11-24 10:21 ` Hirokazu Takahashi
2004-12-01 20:21 ` Marcelo Tosatti
2004-12-08 13:23 ` Hirokazu Takahashi
2005-01-17 9:59 ` Marcelo Tosatti
2005-01-31 18:33 ` Ray Bryant
2005-01-31 18:44 ` Marcelo Tosatti
2005-02-02 21:28 ` Ray Bryant
2005-02-03 2:59 ` Hirokazu Takahashi
2005-02-03 15:19 ` Ray Bryant
2005-02-04 7:32 ` Hirokazu Takahashi
2005-02-04 16:08 ` Ray Bryant
2005-02-07 12:46 ` Hirokazu Takahashi
2005-02-07 20:54 ` Ray Bryant
2005-02-08 2:17 ` Hirokazu Takahashi
[not found] ` <42083913.9050306@sgi.com>
[not found] ` <20050209.151938.63052333.taka@valinux.co.jp>
2005-02-09 20:48 ` Ray Bryant
2005-02-07 13:16 ` Hirokazu Takahashi
2005-02-03 2:49 ` Hirokazu Takahashi
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=41D99C3A.5090400@sgi.com \
--to=raybry@sgi.com \
--cc=linux-mm@kvack.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=taka@valinux.co.jp \
/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