Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-06-10 Thread Kirill A. Shutemov
Dave Hansen wrote: > On 06/07/2013 08:10 AM, Kirill A. Shutemov wrote: > > + /* > > +* When we add a huge page to page cache we take only reference to head > > +* page, but on split we need to take addition reference to all tail > > +* pages since they are still in page cache after

Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-06-10 Thread Dave Hansen
On 06/07/2013 08:10 AM, Kirill A. Shutemov wrote: > + /* > + * When we add a huge page to page cache we take only reference to head > + * page, but on split we need to take addition reference to all tail > + * pages since they are still in page cache after splitting. > + */

Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-06-10 Thread Dave Hansen
On 06/07/2013 08:10 AM, Kirill A. Shutemov wrote: + /* + * When we add a huge page to page cache we take only reference to head + * page, but on split we need to take addition reference to all tail + * pages since they are still in page cache after splitting. + */ +

Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-06-10 Thread Kirill A. Shutemov
Dave Hansen wrote: On 06/07/2013 08:10 AM, Kirill A. Shutemov wrote: + /* +* When we add a huge page to page cache we take only reference to head +* page, but on split we need to take addition reference to all tail +* pages since they are still in page cache after splitting.

Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-06-07 Thread Kirill A. Shutemov
Kirill A. Shutemov wrote: > Dave Hansen wrote: > > Which reminds me... Why do we handle their reference counts differently? :) > > > > It seems like we could easily put a for loop in delete_from_page_cache() > > that will release their reference counts along with the head page. > > Wouldn't that

Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-06-07 Thread Kirill A. Shutemov
Kirill A. Shutemov wrote: Dave Hansen wrote: Which reminds me... Why do we handle their reference counts differently? :) It seems like we could easily put a for loop in delete_from_page_cache() that will release their reference counts along with the head page. Wouldn't that make the

Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-05-28 Thread Kirill A. Shutemov
Dave Hansen wrote: > On 05/11/2013 06:23 PM, Kirill A. Shutemov wrote: > > From: "Kirill A. Shutemov" > > > > As with add_to_page_cache_locked() we handle HPAGE_CACHE_NR pages a > > time. > > > > Signed-off-by: Kirill A. Shutemov > > --- > > mm/filemap.c | 31 +--

Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-05-28 Thread Kirill A. Shutemov
Dave Hansen wrote: On 05/11/2013 06:23 PM, Kirill A. Shutemov wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com As with add_to_page_cache_locked() we handle HPAGE_CACHE_NR pages a time. Signed-off-by: Kirill A. Shutemov kirill.shute...@linux.intel.com ---

Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-05-21 Thread Dave Hansen
On 05/11/2013 06:23 PM, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > As with add_to_page_cache_locked() we handle HPAGE_CACHE_NR pages a > time. > > Signed-off-by: Kirill A. Shutemov > --- > mm/filemap.c | 31 +-- > 1 file changed, 25 insertions(+),

Re: [PATCHv4 14/39] thp, mm: rewrite delete_from_page_cache() to support huge pages

2013-05-21 Thread Dave Hansen
On 05/11/2013 06:23 PM, Kirill A. Shutemov wrote: From: Kirill A. Shutemov kirill.shute...@linux.intel.com As with add_to_page_cache_locked() we handle HPAGE_CACHE_NR pages a time. Signed-off-by: Kirill A. Shutemov kirill.shute...@linux.intel.com --- mm/filemap.c | 31