Re: [PATCH v2 2/2] mm: don't use compound_head() in virt_to_head_page()

2015-01-18 Thread Joonsoo Kim
On Thu, Jan 15, 2015 at 05:16:46PM -0800, Andrew Morton wrote: > On Thu, 15 Jan 2015 16:40:33 +0900 Joonsoo Kim wrote: > > > compound_head() is implemented with assumption that there would be > > race condition when checking tail flag. This assumption is only true > > when we try to access arbitr

Re: [PATCH v2 2/2] mm: don't use compound_head() in virt_to_head_page()

2015-01-15 Thread Christoph Lameter
On Thu, 15 Jan 2015, Andrew Morton wrote: > And perhaps some explanation here as to why virt_to_head_page() can > safely use compound_head_fast(). There's an assumption here that > nobody will be dismantling the compound page while virt_to_head_page() > is in progress, yes? And this assumption a

Re: [PATCH v2 2/2] mm: don't use compound_head() in virt_to_head_page()

2015-01-15 Thread Andrew Morton
On Thu, 15 Jan 2015 16:40:33 +0900 Joonsoo Kim wrote: > compound_head() is implemented with assumption that there would be > race condition when checking tail flag. This assumption is only true > when we try to access arbitrary positioned struct page. > > The situation that virt_to_head_page() i