Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-09 Thread Yang Shi
On 10/9/17 10:26 AM, Michal Hocko wrote: On Tue 10-10-17 00:43:31, Yang Shi wrote: On 10/8/17 11:48 PM, Michal Hocko wrote: On Sun 08-10-17 15:56:51, Kirill A. Shutemov wrote: On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: When passing "huge=always" option for mounting tmpfs,

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-09 Thread Yang Shi
On 10/9/17 10:26 AM, Michal Hocko wrote: On Tue 10-10-17 00:43:31, Yang Shi wrote: On 10/8/17 11:48 PM, Michal Hocko wrote: On Sun 08-10-17 15:56:51, Kirill A. Shutemov wrote: On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: When passing "huge=always" option for mounting tmpfs,

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-09 Thread Michal Hocko
On Tue 10-10-17 00:43:31, Yang Shi wrote: > > > On 10/8/17 11:48 PM, Michal Hocko wrote: > > On Sun 08-10-17 15:56:51, Kirill A. Shutemov wrote: > > > On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: > > > > When passing "huge=always" option for mounting tmpfs, THP is supposed to > > >

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-09 Thread Michal Hocko
On Tue 10-10-17 00:43:31, Yang Shi wrote: > > > On 10/8/17 11:48 PM, Michal Hocko wrote: > > On Sun 08-10-17 15:56:51, Kirill A. Shutemov wrote: > > > On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: > > > > When passing "huge=always" option for mounting tmpfs, THP is supposed to > > >

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-09 Thread Yang Shi
On 10/8/17 11:48 PM, Michal Hocko wrote: On Sun 08-10-17 15:56:51, Kirill A. Shutemov wrote: On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: When passing "huge=always" option for mounting tmpfs, THP is supposed to be allocated all the time when it can fit, but when the available

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-09 Thread Yang Shi
On 10/8/17 11:48 PM, Michal Hocko wrote: On Sun 08-10-17 15:56:51, Kirill A. Shutemov wrote: On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: When passing "huge=always" option for mounting tmpfs, THP is supposed to be allocated all the time when it can fit, but when the available

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-09 Thread Michal Hocko
On Sun 08-10-17 15:56:51, Kirill A. Shutemov wrote: > On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: > > When passing "huge=always" option for mounting tmpfs, THP is supposed to > > be allocated all the time when it can fit, but when the available space is > > smaller than the size of

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-09 Thread Michal Hocko
On Sun 08-10-17 15:56:51, Kirill A. Shutemov wrote: > On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: > > When passing "huge=always" option for mounting tmpfs, THP is supposed to > > be allocated all the time when it can fit, but when the available space is > > smaller than the size of

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-08 Thread Kirill A. Shutemov
On Mon, Oct 09, 2017 at 03:51:06AM +0800, Yang Shi wrote: > > > On 10/8/17 5:56 AM, Kirill A. Shutemov wrote: > > On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: > > > When passing "huge=always" option for mounting tmpfs, THP is supposed to > > > be allocated all the time when it can

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-08 Thread Kirill A. Shutemov
On Mon, Oct 09, 2017 at 03:51:06AM +0800, Yang Shi wrote: > > > On 10/8/17 5:56 AM, Kirill A. Shutemov wrote: > > On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: > > > When passing "huge=always" option for mounting tmpfs, THP is supposed to > > > be allocated all the time when it can

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-08 Thread Yang Shi
On 10/8/17 5:56 AM, Kirill A. Shutemov wrote: On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: When passing "huge=always" option for mounting tmpfs, THP is supposed to be allocated all the time when it can fit, but when the available space is smaller than the size of THP (2MB on

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-08 Thread Yang Shi
On 10/8/17 5:56 AM, Kirill A. Shutemov wrote: On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: When passing "huge=always" option for mounting tmpfs, THP is supposed to be allocated all the time when it can fit, but when the available space is smaller than the size of THP (2MB on

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-08 Thread Kirill A. Shutemov
On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: > When passing "huge=always" option for mounting tmpfs, THP is supposed to > be allocated all the time when it can fit, but when the available space is > smaller than the size of THP (2MB on x86), shmem fault handler still tries > to

Re: [RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-08 Thread Kirill A. Shutemov
On Sat, Oct 07, 2017 at 04:22:10AM +0800, Yang Shi wrote: > When passing "huge=always" option for mounting tmpfs, THP is supposed to > be allocated all the time when it can fit, but when the available space is > smaller than the size of THP (2MB on x86), shmem fault handler still tries > to

[RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-06 Thread Yang Shi
When passing "huge=always" option for mounting tmpfs, THP is supposed to be allocated all the time when it can fit, but when the available space is smaller than the size of THP (2MB on x86), shmem fault handler still tries to allocate huge page every time, then fallback to regular 4K page

[RFC PATCH] mm: shm: round up tmpfs size to huge page size when huge=always

2017-10-06 Thread Yang Shi
When passing "huge=always" option for mounting tmpfs, THP is supposed to be allocated all the time when it can fit, but when the available space is smaller than the size of THP (2MB on x86), shmem fault handler still tries to allocate huge page every time, then fallback to regular 4K page