Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: KAMEZAWA Hiroyuki
Date: Thursday, April 22, 2010 - 10:27 pm

On Fri, 23 Apr 2010 14:11:37 +0900
Minchan Kim <minchan.kim@gmail.com> wrote:


Ah,..."don't use seqlock" is trend ?

BTW, this isn't seqlock but seq_counter :)

I'm still testing. What I doubt other than vma_address() is fork().
at fork(), followings _may_ happen. (but I'm not sure).

	chain vma.
	copy page table.
	   -> migration entry is copied, too.

At remap, 
	for each vma
	    look into page table and replace.

Then,
						rmap_walk().
	fork(parent, child)
						look into child's page table.
						=> we fond nothing.
	spin_lock(child's pagetable);
	spin_lock(parant's page table);
	copy migration entry
	spin_unlock(paranet's page table)
	spin_unlock(child's page table)
						update parent's paga table

If we always find parant's page table before child's , there is no race.
But I can't get prit_tree's list order as clear image. Hmm.

Thanks,
-Kame








--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUGFIX][mm][PATCH] fix migration race in rmap_walk, KAMEZAWA Hiroyuki, (Thu Apr 22, 8:01 pm)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, Minchan Kim, (Thu Apr 22, 10:11 pm)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, KAMEZAWA Hiroyuki, (Thu Apr 22, 10:27 pm)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, Minchan Kim, (Fri Apr 23, 12:00 am)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, KAMEZAWA Hiroyuki, (Fri Apr 23, 12:17 am)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, Minchan Kim, (Fri Apr 23, 12:53 am)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, KAMEZAWA Hiroyuki, (Fri Apr 23, 12:55 am)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, KAMEZAWA Hiroyuki, (Fri Apr 23, 7:02 pm)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, KAMEZAWA Hiroyuki, (Sun Apr 25, 4:49 pm)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, KAMEZAWA Hiroyuki, (Sun Apr 25, 7:53 pm)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, KAMEZAWA Hiroyuki, (Mon Apr 26, 2:28 am)
Re: [BUGFIX][mm][PATCH] fix migration race in rmap_walk, KAMEZAWA Hiroyuki, (Mon Apr 26, 2:49 am)