lkml.org 
[lkml]   [2013]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCHv2, RFC 18/30] thp, mm: truncate support for transparent huge page cache
Date
Dave wrote:
> On 03/14/2013 10:50 AM, Kirill A. Shutemov wrote:
> > @@ -280,6 +291,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
> > if (index > end)
> > break;
> >
> > + VM_BUG_ON(PageTransHuge(page));
> > lock_page(page);
> > WARN_ON(page->index != index);
> > wait_on_page_writeback(page);
>
> This looks to be during the second truncate pass where things are
> allowed to block. What's the logic behind it not being possible to
> encounter TransHugePage()s here?

Good question.

The only way how the page can be created from under us is collapsing, but
it's not implemented for file pages and I'm not sure yet how to implement
it...

Probably, I'll replace the BUG with

if (PageTransHuge(page))
split_huge_page(page);

It should be good enough.

--
Kirill A. Shutemov


\
 
 \ /
  Last update: 2013-03-28 17:01    [W:0.471 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site