Re: [PATCH -mm] mm: refactor page index/offset getters

2014-07-28 Thread Naoya Horiguchi
On Mon, Jul 28, 2014 at 04:29:52PM -0400, Johannes Weiner wrote: > On Tue, Jul 15, 2014 at 12:41:12PM -0400, Naoya Horiguchi wrote: > > @@ -399,28 +399,24 @@ static inline struct page *read_mapping_page(struct > > address_space *mapping, > > } > > > > /* > > - * Get the offset in PAGE_SIZE. >

Re: [PATCH -mm] mm: refactor page index/offset getters

2014-07-28 Thread Johannes Weiner
On Tue, Jul 15, 2014 at 12:41:12PM -0400, Naoya Horiguchi wrote: > @@ -399,28 +399,24 @@ static inline struct page *read_mapping_page(struct > address_space *mapping, > } > > /* > - * Get the offset in PAGE_SIZE. > + * Return the 4kB page offset of the given page. > * (TODO: hugepage should

Re: [PATCH -mm] mm: refactor page index/offset getters

2014-07-23 Thread Naoya Horiguchi
On Wed, Jul 23, 2014 at 02:39:18PM -0700, Andrew Morton wrote: > On Tue, 15 Jul 2014 12:41:12 -0400 Naoya Horiguchi > wrote: > > > There is a complaint about duplication around the fundamental routines > > of page index/offset getters. > > > > page_(index|offset) and page_file_(index|offset) pr

Re: [PATCH -mm] mm: refactor page index/offset getters

2014-07-23 Thread Andrew Morton
On Tue, 15 Jul 2014 12:41:12 -0400 Naoya Horiguchi wrote: > There is a complaint about duplication around the fundamental routines > of page index/offset getters. > > page_(index|offset) and page_file_(index|offset) provide the same > functionality, so we can merge them as page_(index|offset),

[PATCH -mm] mm: refactor page index/offset getters

2014-07-15 Thread Naoya Horiguchi
On Mon, Jul 07, 2014 at 12:39:23PM -0700, Andrew Morton wrote: > On Wed, 2 Jul 2014 00:30:57 -0400 Naoya Horiguchi > wrote: > > > Subject: [PATCH v2] rmap: fix pgoff calculation to handle hugepage correctly > > > > I triggered VM_BUG_ON() in vma_address() when I try to migrate an anonymous > >