lkml.org 
[lkml]   [2006]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] Swapless V2: Revise main migration logic
On Sat, 15 Apr 2006 10:41:59 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> Note that there is an issue with your approach. If a migration entry is
> copied during fork then SWP_MIGRATION_WRITE must become SWP_MIGRATION_READ
> for some cases. Would you look into fixing this?
>

Thank you for pointing out the issue.

In my understanding, copy_page_range() is used at fork().
This finally calls copy_one_pte() and copies ptes one by one.

Maybe, I'll do like this.
==
438 if (unlikely(!pte_present(pte)) {
439 if (!pte_file(pte)) {
440 swap_duplicate(pte_to_swp_entry(pte));
entry = pte_to_swp_entry(pte);
#ifdef CONFIG_MIGRATION
if (is_migration_entry(entry)) {
......always copy as MIGRATION_READ.
}
#endif
441 /* make sure dst_mm is on swapoff's mmlist. */
442 if (unlikely(list_empty(&dst_mm->mmlist))) {
443 spin_lock(&mmlist_lock);
444 if (list_empty(&dst_mm->mmlist))
445 list_add(&dst_mm->mmlist,
446 &src_mm->mmlist);
447 spin_unlock(&mmlist_lock);
448 }
449 }
450 goto out_set_pte;
451 }
==

Thanks,
-Kame

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-17 02:19    [W:0.141 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site