linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Swapless page migration V2: Overview
@ 2006-04-13 23:54 Christoph Lameter
  2006-04-13 23:54 ` [PATCH 1/5] Swapless V2: try_to_unmap() - Rename ignrefs to "migration" Christoph Lameter
                   ` (5 more replies)
  0 siblings, 6 replies; 54+ messages in thread
From: Christoph Lameter @ 2006-04-13 23:54 UTC (permalink / raw)
  To: akpm
  Cc: Hugh Dickins, linux-kernel, Lee Schermerhorn, linux-mm,
	Christoph Lameter, Hirokazu Takahashi, Marcelo Tosatti,
	KAMEZAWA Hiroyuki

Swapless Page migration V2

Currently page migration is depending on the ability to assign swap entries
to pages. However, those entries will only be to identify anonymous pages.
Page migration will not work without swap although swap space is never
really used.

This patchset removes that dependency by introducing a special type of
swap entry that encodes a pfn number of the page being migrated. If that
swap pte (a migration entry) is encountered then do_swap_page() will redo the
fault until the migration entry has been removed.

Migration entries have a very short lifetime and exist only while the page is
locked. Only a few supporting functions are needed.

To some extend this covers the same ground as Marcelo's migration
cache. However, I hope that this approach is simpler and less intrusive.

The migration functions will still be able to use swap entries if a page
is already on the swap cache. But migration functions will no longer assign
swap entries to pages or remove them. Maybe lazy migration can then manage
its own swap cache or migration cache if needed?

Efficiency of migration is increased by:

1. Avoiding useless retries
   The use of migration entries avoids raising the page count in do_swap_page().
   The existing approach can increase the page count between the unmapping
   of the ptes for a page and the page migration page count check resulting
   in having to retry migration although all accesses have been stopped.

2. Swap entries do not have to be assigned and removed from pages.

3. No swap space has to be setup for page migration. Page migration
   will never use swap.

The patchset will allow later patches to enable migration of VM_LOCKED vmas,
the ability to exempt vmas from page migration, and allow the implementation
of a another userland migration API for handling batches of pages.

This patchset was first discussed here:

http://marc.theaimsgroup.com/?l=linux-mm&m=114413402522102&w=2

Changes from V1->V2:
- Make this even lighter on the VM by moving the migration removal
  code into mm/migrate.c
- Do not increase pagecount in do_swap_page()
- Make this work and build correctly for non swap and non migration
  cases.
- Stress testing and work out (hopefully) all kinks.

The patchset consists of five patches:

1. try_to_unmap(): Rename ignrefs to "migration"

   We will be using that try_to_unmap flag in the next patch to
   mean that page migration has called try_to_unmap().

2. Add migration swap entries

   Add the SWP_TYPE_MIGRATION and a few necessary handlers for this
   type of entry. Also modify do_swap_page() to repeat fault if
   a migration entry is encountered.

3. try_to_unmap(): Create migration entries if migration calls
   try_to_unmap for pages without PageSwapCache() but with the
   migration flag set.

4. Rip out old swap migration code

   Remove all the old swap based code. Note that this also removes the fallback
   to swap if all other attempts to migrate fail and also the ability to
   migrate to swap (which was never used)

5. Revise main migration code

   Revise the migration logic to use the new migration entries. Add
   functions to convert migration entries to regular ptes.

--
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] 54+ messages in thread

end of thread, other threads:[~2006-04-18 16:49 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-13 23:54 [PATCH 0/5] Swapless page migration V2: Overview Christoph Lameter
2006-04-13 23:54 ` [PATCH 1/5] Swapless V2: try_to_unmap() - Rename ignrefs to "migration" Christoph Lameter
2006-04-13 23:54 ` [PATCH 2/5] Swapless V2: Add migration swap entries Christoph Lameter
2006-04-14  0:13   ` Andrew Morton
2006-04-14  0:29     ` Christoph Lameter
2006-04-14  0:42       ` Andrew Morton
2006-04-14  0:46         ` Christoph Lameter
2006-04-14  1:01           ` Andrew Morton
2006-04-14  1:17             ` Andrew Morton
2006-04-14  1:31               ` Christoph Lameter
2006-04-14  5:25                 ` Andrew Morton
2006-04-14 14:27                   ` Lee Schermerhorn
2006-04-14 16:01                   ` Christoph Lameter
2006-04-14  1:31             ` Christoph Lameter
2006-04-14  5:29               ` Andrew Morton
2006-04-14 17:28                 ` Implement lookup_swap_cache for migration entries Christoph Lameter
2006-04-14 18:31                   ` Andrew Morton
2006-04-14 18:48                     ` Christoph Lameter
2006-04-14 19:15                       ` Andrew Morton
2006-04-14 19:22                         ` Christoph Lameter
2006-04-14 19:53                           ` Andrew Morton
2006-04-14 20:12                             ` Christoph Lameter
2006-04-14 21:51                             ` Wait for migrating page after incr of page count under anon_vma lock Christoph Lameter
2006-04-17 23:52                               ` migration_entry_wait: Use the pte lock instead of the " Christoph Lameter
2006-04-14  0:36     ` [PATCH 2/5] Swapless V2: Add migration swap entries Christoph Lameter
2006-04-13 23:54 ` [PATCH 3/5] Swapless V2: Make try_to_unmap() create migration entries Christoph Lameter
2006-04-13 23:54 ` [PATCH 4/5] Swapless V2: Rip out swap portion of old migration code Christoph Lameter
2006-04-13 23:54 ` [PATCH 5/5] Swapless V2: Revise main migration logic Christoph Lameter
2006-04-14  1:19   ` KAMEZAWA Hiroyuki
2006-04-14  1:33     ` Christoph Lameter
2006-04-14  1:40       ` KAMEZAWA Hiroyuki
2006-04-14  2:34       ` KAMEZAWA Hiroyuki
2006-04-14  2:44         ` KAMEZAWA Hiroyuki
2006-04-14 17:29           ` Preserve write permissions in migration entries Christoph Lameter
2006-04-14 16:48         ` [PATCH 5/5] Swapless V2: Revise main migration logic Christoph Lameter
2006-04-15  0:06           ` KAMEZAWA Hiroyuki
2006-04-15 17:41             ` Christoph Lameter
2006-04-17  0:18               ` KAMEZAWA Hiroyuki
2006-04-17 17:00                 ` Christoph Lameter
2006-04-18  0:04                   ` KAMEZAWA Hiroyuki
2006-04-18  0:27                     ` Christoph Lameter
2006-04-18  0:42                       ` KAMEZAWA Hiroyuki
2006-04-18  1:57                         ` Christoph Lameter
2006-04-18  3:00                           ` KAMEZAWA Hiroyuki
2006-04-18  3:16                             ` Christoph Lameter
2006-04-18  3:32                               ` KAMEZAWA Hiroyuki
2006-04-18  6:58                                 ` Christoph Lameter
2006-04-18  8:05                                   ` KAMEZAWA Hiroyuki
2006-04-18  8:27                                     ` Christoph Lameter
2006-04-18  9:08                                       ` KAMEZAWA Hiroyuki
2006-04-18 16:49                                         ` Christoph Lameter
2006-04-14  0:08 ` [PATCH 0/5] Swapless page migration V2: Overview Andrew Morton
2006-04-14  0:27   ` Christoph Lameter
2006-04-14 14:14     ` Lee Schermerhorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).