Re: [PATCH] hugetlbfs: add O_TMPFILE support

2019-10-23 Thread Piotr Sarna
On 10/23/19 4:55 AM, Mike Kravetz wrote: On 10/22/19 12:09 AM, Piotr Sarna wrote: On 10/21/19 7:17 PM, Mike Kravetz wrote: On 10/15/19 4:37 PM, Mike Kravetz wrote: On 10/15/19 3:50 AM, Michal Hocko wrote: On Tue 15-10-19 11:01:12, Piotr Sarna wrote: With hugetlbfs, a common pattern for

Re: [PATCH] hugetlbfs: add O_TMPFILE support

2019-10-22 Thread Mike Kravetz
On 10/22/19 12:09 AM, Piotr Sarna wrote: > On 10/21/19 7:17 PM, Mike Kravetz wrote: >> On 10/15/19 4:37 PM, Mike Kravetz wrote: >>> On 10/15/19 3:50 AM, Michal Hocko wrote: On Tue 15-10-19 11:01:12, Piotr Sarna wrote: > With hugetlbfs, a common pattern for mapping anonymous huge pages

Re: [PATCH] hugetlbfs: add O_TMPFILE support

2019-10-22 Thread Piotr Sarna
On 10/21/19 7:17 PM, Mike Kravetz wrote: On 10/15/19 4:37 PM, Mike Kravetz wrote: On 10/15/19 3:50 AM, Michal Hocko wrote: On Tue 15-10-19 11:01:12, Piotr Sarna wrote: With hugetlbfs, a common pattern for mapping anonymous huge pages is to create a temporary file first. Really? I though

Re: [PATCH] hugetlbfs: add O_TMPFILE support

2019-10-21 Thread Mike Kravetz
On 10/15/19 4:37 PM, Mike Kravetz wrote: > On 10/15/19 3:50 AM, Michal Hocko wrote: >> On Tue 15-10-19 11:01:12, Piotr Sarna wrote: >>> With hugetlbfs, a common pattern for mapping anonymous huge pages >>> is to create a temporary file first. >> >> Really? I though that this is normally done by

Re: [PATCH] hugetlbfs: add O_TMPFILE support

2019-10-15 Thread Mike Kravetz
On 10/15/19 3:50 AM, Michal Hocko wrote: > On Tue 15-10-19 11:01:12, Piotr Sarna wrote: >> With hugetlbfs, a common pattern for mapping anonymous huge pages >> is to create a temporary file first. > > Really? I though that this is normally done by shmget(SHM_HUGETLB) or > mmap(MAP_HUGETLB). Or

Re: [PATCH] hugetlbfs: add O_TMPFILE support

2019-10-15 Thread Michal Hocko
On Tue 15-10-19 11:01:12, Piotr Sarna wrote: > With hugetlbfs, a common pattern for mapping anonymous huge pages > is to create a temporary file first. Really? I though that this is normally done by shmget(SHM_HUGETLB) or mmap(MAP_HUGETLB). Or maybe I misunderstood your definition on anonymous

[PATCH] hugetlbfs: add O_TMPFILE support

2019-10-15 Thread Piotr Sarna
With hugetlbfs, a common pattern for mapping anonymous huge pages is to create a temporary file first. Currently libraries like libhugetlbfs and seastar create these with a standard mkstemp+unlink trick, but it would be more robust to be able to simply pass the O_TMPFILE flag to open(). O_TMPFILE