Re: [RFC v2 3/3] mm: make swapin readahead to improve thp collapse rate

2015-06-25 Thread Rik van Riel
On 06/24/2015 08:33 AM, Vlastimil Babka wrote: > On 06/22/2015 03:37 AM, Rik van Riel wrote: >> On 06/21/2015 02:11 PM, Kirill A. Shutemov wrote: >>> On Sat, Jun 20, 2015 at 02:28:06PM +0300, Ebru Akagunduz wrote: + __collapse_huge_page_swapin(mm, vma, address, pmd, pte); + >>> >>> And n

Re: [RFC v2 3/3] mm: make swapin readahead to improve thp collapse rate

2015-06-24 Thread Vlastimil Babka
On 06/22/2015 03:37 AM, Rik van Riel wrote: > On 06/21/2015 02:11 PM, Kirill A. Shutemov wrote: >> On Sat, Jun 20, 2015 at 02:28:06PM +0300, Ebru Akagunduz wrote: >>> + __collapse_huge_page_swapin(mm, vma, address, pmd, pte); >>> + >> >> And now the pages we swapped in are not isolated, right? >

Re: [RFC v2 3/3] mm: make swapin readahead to improve thp collapse rate

2015-06-21 Thread Rik van Riel
On 06/21/2015 02:11 PM, Kirill A. Shutemov wrote: > On Sat, Jun 20, 2015 at 02:28:06PM +0300, Ebru Akagunduz wrote: >> +static void __collapse_huge_page_swapin(struct mm_struct *mm, >> +struct vm_area_struct *vma, >> +unsigned

Re: [RFC v2 3/3] mm: make swapin readahead to improve thp collapse rate

2015-06-21 Thread Kirill A. Shutemov
On Sun, Jun 21, 2015 at 09:11:31PM +0300, Kirill A. Shutemov wrote: > On Sat, Jun 20, 2015 at 02:28:06PM +0300, Ebru Akagunduz wrote: > > + /* pte is unmapped now, we need to map it */ > > + pte = pte_offset_map(pmd, _address); > > No, it's within the same pte p

Re: [RFC v2 3/3] mm: make swapin readahead to improve thp collapse rate

2015-06-21 Thread Kirill A. Shutemov
On Sat, Jun 20, 2015 at 02:28:06PM +0300, Ebru Akagunduz wrote: > This patch makes swapin readahead to improve thp collapse rate. > When khugepaged scanned pages, there can be a few of the pages > in swap area. > > With the patch THP can collapse 4kB pages into a THP when > there are up to max_pte

[RFC v2 3/3] mm: make swapin readahead to improve thp collapse rate

2015-06-20 Thread Ebru Akagunduz
This patch makes swapin readahead to improve thp collapse rate. When khugepaged scanned pages, there can be a few of the pages in swap area. With the patch THP can collapse 4kB pages into a THP when there are up to max_ptes_swap swap ptes in a 2MB range. The patch was tested with a test program t