Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem)FS

2019-06-24 Thread Song Liu
> On Jun 24, 2019, at 12:48 AM, Hillf Danton wrote: > > > Hello > > On Mon, 24 Jun 2019 12:28:32 +0800 Song Liu wrote: >> >> Hi Hillf, >> >>> On Jun 23, 2019, at 8:16 PM, Hillf Danton wrote: >>> >>> >>> Hello >>> >>> On Sun, 23 Jun 2019 13:48:47 +0800 Song Liu wrote: This patch

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Song Liu
> On Jun 24, 2019, at 8:15 AM, Kirill A. Shutemov wrote: > > On Mon, Jun 24, 2019 at 03:04:21PM +, Song Liu wrote: >> >> >>> On Jun 24, 2019, at 7:54 AM, Kirill A. Shutemov >>> wrote: >>> >>> On Mon, Jun 24, 2019 at 02:42:13PM +, Song Liu wrote: > On Jun 24, 2019,

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Kirill A. Shutemov
On Mon, Jun 24, 2019 at 03:04:21PM +, Song Liu wrote: > > > > On Jun 24, 2019, at 7:54 AM, Kirill A. Shutemov > > wrote: > > > > On Mon, Jun 24, 2019 at 02:42:13PM +, Song Liu wrote: > >> > >> > >>> On Jun 24, 2019, at 7:27 AM, Kirill A. Shutemov > >>> wrote: > >>> > >>> On Mon,

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Song Liu
> On Jun 24, 2019, at 7:54 AM, Kirill A. Shutemov wrote: > > On Mon, Jun 24, 2019 at 02:42:13PM +, Song Liu wrote: >> >> >>> On Jun 24, 2019, at 7:27 AM, Kirill A. Shutemov >>> wrote: >>> >>> On Mon, Jun 24, 2019 at 02:01:05PM +, Song Liu wrote: >> @@ -1392,6 +1403,23 @@

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Kirill A. Shutemov
On Mon, Jun 24, 2019 at 02:42:13PM +, Song Liu wrote: > > > > On Jun 24, 2019, at 7:27 AM, Kirill A. Shutemov > > wrote: > > > > On Mon, Jun 24, 2019 at 02:01:05PM +, Song Liu wrote: > @@ -1392,6 +1403,23 @@ static void collapse_file(struct mm_struct *mm, >

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Song Liu
> On Jun 24, 2019, at 7:27 AM, Kirill A. Shutemov wrote: > > On Mon, Jun 24, 2019 at 02:01:05PM +, Song Liu wrote: @@ -1392,6 +1403,23 @@ static void collapse_file(struct mm_struct *mm, result = SCAN_FAIL; goto

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Kirill A. Shutemov
On Mon, Jun 24, 2019 at 02:01:05PM +, Song Liu wrote: > >> @@ -1392,6 +1403,23 @@ static void collapse_file(struct mm_struct *mm, > >>result = SCAN_FAIL; > >>goto xa_unlocked; > >>} > >> + } else if (!page ||

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Song Liu
> On Jun 24, 2019, at 5:47 AM, Kirill A. Shutemov wrote: > > On Sat, Jun 22, 2019 at 10:47:48PM -0700, Song Liu wrote: >> This patch is (hopefully) the first step to enable THP for non-shmem >> filesystems. >> >> This patch enables an application to put part of its text sections to THP >>

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-24 Thread Kirill A. Shutemov
On Sat, Jun 22, 2019 at 10:47:48PM -0700, Song Liu wrote: > This patch is (hopefully) the first step to enable THP for non-shmem > filesystems. > > This patch enables an application to put part of its text sections to THP > via madvise, for example: > > madvise((void *)0x60, 0x20,

Re: [PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-23 Thread Song Liu
Hi Hillf, > On Jun 23, 2019, at 8:16 PM, Hillf Danton wrote: > > > Hello > > On Sun, 23 Jun 2019 13:48:47 +0800 Song Liu wrote: >> This patch is (hopefully) the first step to enable THP for non-shmem >> filesystems. >> >> This patch enables an application to put part of its text sections to

[PATCH v7 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-22 Thread Song Liu
This patch is (hopefully) the first step to enable THP for non-shmem filesystems. This patch enables an application to put part of its text sections to THP via madvise, for example: madvise((void *)0x60, 0x20, MADV_HUGEPAGE); We tried to reuse the logic for THP on tmpfs. Currently,