Re: [RFC PATCH 3/3] Change THP behavior

2013-12-16 Thread Alex Thorlton
> Hm. I think this part is not correct: you collapse temp thp page > into real one only for current procees. What will happen if a process with > temp thp pages was forked? That's a scenario that I hadn't yet addressed, but definitely something I'll consider going forward. I think we can come up

Re: [RFC PATCH 3/3] Change THP behavior

2013-12-13 Thread Oleg Nesterov
I know almost nothing about thp, unlikely I understand this patch correctly... But, afaics, the main idea is that until we have mm->thp_threshold faults we install the tail pages of temp_hugepage->page as a normal anonymous page, then we actually add the Head/Tail metadata and add the necessary hu

RE: [RFC PATCH 3/3] Change THP behavior

2013-12-13 Thread Kirill A. Shutemov
Alex Thorlton wrote: > + /* > + * now that we've done the accounting work, we check to see if > + * we've exceeded our threshold > + */ > + if (temp_thp->ref_count >= mm->thp_threshold) { > + pmd_t pmd_entry; > + pgtable_t pgtable; > + > +

[RFC PATCH 3/3] Change THP behavior

2013-12-12 Thread Alex Thorlton
This patch implements the functionality we're really going for here. It adds the decision making behavior to determine when to grab a temporary compound page, and whether or not to fault in single pages or to turn the temporary page into a THP. This one is rather large, might split it up a bit mor