Re: [PATCH 5/11] ksm: get_ksm_page locked

2013-02-14 Thread Mel Gorman
On Thu, Feb 07, 2013 at 04:33:58PM -0800, Hugh Dickins wrote: > > > > > > --- mmotm.orig/mm/ksm.c 2013-01-25 14:36:53.244205966 -0800 > > > +++ mmotm/mm/ksm.c2013-01-25 14:36:58.856206099 -0800 > > > @@ -514,15 +514,14 @@ static void remove_node_from_stable_tree > > > * but this is dif

Re: [PATCH 5/11] ksm: get_ksm_page locked

2013-02-07 Thread Hugh Dickins
On Tue, 5 Feb 2013, Mel Gorman wrote: > On Fri, Jan 25, 2013 at 06:00:50PM -0800, Hugh Dickins wrote: > > In some places where get_ksm_page() is used, we need the page to be locked. > > > > When KSM migration is fully enabled, we shall want that to make sure that > > the page just acquired cannot

Re: [PATCH 5/11] ksm: get_ksm_page locked

2013-02-05 Thread Mel Gorman
On Fri, Jan 25, 2013 at 06:00:50PM -0800, Hugh Dickins wrote: > In some places where get_ksm_page() is used, we need the page to be locked. > > When KSM migration is fully enabled, we shall want that to make sure that > the page just acquired cannot be migrated beneath us (raised page count is > o

Re: [PATCH 5/11] ksm: get_ksm_page locked

2013-01-27 Thread Hugh Dickins
On Sun, 27 Jan 2013, Simon Jeons wrote: > On Sun, 2013-01-27 at 14:08 -0800, Hugh Dickins wrote: > > On Sat, 26 Jan 2013, Simon Jeons wrote: > > > > > > Why the parameter lock passed from stable_tree_search/insert is true, > > > but remove_rmap_item_from_tree is false? > > > > The other way round

Re: [PATCH 5/11] ksm: get_ksm_page locked

2013-01-27 Thread Simon Jeons
On Sun, 2013-01-27 at 14:08 -0800, Hugh Dickins wrote: > On Sat, 26 Jan 2013, Simon Jeons wrote: > > On Fri, 2013-01-25 at 18:00 -0800, Hugh Dickins wrote: > > > In some places where get_ksm_page() is used, we need the page to be > > > locked. > > > > > > > In function get_ksm_page, why check pa

Re: [PATCH 5/11] ksm: get_ksm_page locked

2013-01-27 Thread Hugh Dickins
On Sat, 26 Jan 2013, Simon Jeons wrote: > > BTW, what's the meaning of ksm page forked? A ksm page is mapped into a process's mm, then that process calls fork(): the ksm page then appears in the child's mm, before ksmd has tracked it. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 5/11] ksm: get_ksm_page locked

2013-01-27 Thread Hugh Dickins
On Sat, 26 Jan 2013, Simon Jeons wrote: > On Fri, 2013-01-25 at 18:00 -0800, Hugh Dickins wrote: > > In some places where get_ksm_page() is used, we need the page to be locked. > > > > In function get_ksm_page, why check page->mapping => > get_page_unless_zero => check page->mapping instead of >

Re: [PATCH 5/11] ksm: get_ksm_page locked

2013-01-26 Thread Simon Jeons
On Fri, 2013-01-25 at 18:00 -0800, Hugh Dickins wrote: > In some places where get_ksm_page() is used, we need the page to be locked. > > When KSM migration is fully enabled, we shall want that to make sure that > the page just acquired cannot be migrated beneath us (raised page count is > only eff

Re: [PATCH 5/11] ksm: get_ksm_page locked

2013-01-26 Thread Simon Jeons
Hi Hugh, On Fri, 2013-01-25 at 18:00 -0800, Hugh Dickins wrote: > In some places where get_ksm_page() is used, we need the page to be locked. > In function get_ksm_page, why check page->mapping => get_page_unless_zero => check page->mapping instead of get_page_unless_zero => check page->mapping,

[PATCH 5/11] ksm: get_ksm_page locked

2013-01-25 Thread Hugh Dickins
In some places where get_ksm_page() is used, we need the page to be locked. When KSM migration is fully enabled, we shall want that to make sure that the page just acquired cannot be migrated beneath us (raised page count is only effective when there is serialization to make sure migration notices