Re: [PATCH] selftests/mm: do not try to split below filesystem block size

2024-08-26 Thread Pankaj Raghav (Samsung)
On Mon, Aug 26, 2024 at 10:59:16AM -0400, Zi Yan wrote: > On 26 Aug 2024, at 10:53, Pankaj Raghav (Samsung) wrote: > > > From: Pankaj Raghav > > > > There is no point trying to split pagecache thp below the blocksize of > > the filesystem as that is the minimum

[PATCH] selftests/mm: do not try to split below filesystem block size

2024-08-26 Thread Pankaj Raghav (Samsung)
From: Pankaj Raghav There is no point trying to split pagecache thp below the blocksize of the filesystem as that is the minimum order that pagecache needs to maintain to support blocksizes greater than pagesize [1]. Set the lower limit for the splitting order to be the fs blocksize order. As

Re: [PATCH v3] selftests/mm: use asm volatile to not optimize mmap read variable

2024-06-08 Thread Pankaj Raghav (Samsung)
On Fri, Jun 07, 2024 at 09:39:36PM -0700, Andrew Morton wrote: > On Thu, 6 Jun 2024 20:36:19 +0000 "Pankaj Raghav (Samsung)" > wrote: > > > From: Pankaj Raghav > > > > create_pagecache_thp_and_fd() in split_huge_page_test.c used the > > variable d

Re: [PATCH v4] selftest: mm: Test if hugepage does not get leaked during __bio_release_pages()

2024-06-07 Thread Pankaj Raghav (Samsung)
On Fri, Jun 07, 2024 at 01:06:23PM -0700, Andrew Morton wrote: > On Fri, 7 Jun 2024 13:20:00 -0500 Donet Tom wrote: > > > V4: > > - Added this test to run_vmtests.sh. > > v4 also contains this change: I think v3 already had these changes [1] V3: - Fixed the build error when it is compiled wit

[PATCH v3] selftests/mm: use asm volatile to not optimize mmap read variable

2024-06-06 Thread Pankaj Raghav (Samsung)
From: Pankaj Raghav create_pagecache_thp_and_fd() in split_huge_page_test.c used the variable dummy to perform mmap read. However, this test was skipped even on XFS which has large folio support. The issue was compiler (gcc 13.2.0) was optimizing out the dummy variable, therefore, not creating

Re: [PATCH] selftests/mm: use volatile keyword to not optimize mmap read variable

2024-06-06 Thread Pankaj Raghav (Samsung)
On Thu, Jun 06, 2024 at 10:21:51PM +0200, David Hildenbrand wrote: > On 06.06.24 22:18, Pankaj Raghav (Samsung) wrote: > > On Thu, Jun 06, 2024 at 05:57:21PM +0200, David Hildenbrand wrote: > > > On 06.06.24 17:56, David Hildenbrand wrote: > > > > On 06.06.24 15:58,

Re: [PATCH] selftests/mm: use volatile keyword to not optimize mmap read variable

2024-06-06 Thread Pankaj Raghav (Samsung)
On Thu, Jun 06, 2024 at 05:57:21PM +0200, David Hildenbrand wrote: > On 06.06.24 17:56, David Hildenbrand wrote: > > On 06.06.24 15:58, Pankaj Raghav (Samsung) wrote: > > > From: Pankaj Raghav > > > > > > create_pagecache_thp_and_fd() in split_huge_page_tes

[PATCH v2] selftests/mm: use global variable to not optimize mmap read variable

2024-06-06 Thread Pankaj Raghav (Samsung)
From: Pankaj Raghav create_pagecache_thp_and_fd() in split_huge_page_test.c used the variable dummy to perform mmap read. However, this test was skipped even on XFS which has large folio support. The issue was compiler (gcc 13.2.0) was optimizing out the dummy variable, therefore, not creating

Re: [PATCH] selftests/mm: use volatile keyword to not optimize mmap read variable

2024-06-06 Thread Pankaj Raghav (Samsung)
On Thu, Jun 06, 2024 at 03:35:31PM +0100, Matthew Wilcox wrote: > On Thu, Jun 06, 2024 at 01:58:35PM +0000, Pankaj Raghav (Samsung) wrote: > > +++ b/tools/testing/selftests/mm/split_huge_page_test.c > > @@ -300,7 +300,7 @@ int create_pagecache_thp_and_fd(const char *testfile, >

[PATCH] selftests/mm: use volatile keyword to not optimize mmap read variable

2024-06-06 Thread Pankaj Raghav (Samsung)
From: Pankaj Raghav create_pagecache_thp_and_fd() in split_huge_page_test.c used the variable dummy to perform mmap read. However, this test was skipped even on XFS which has large folio support. The issue was compiler (gcc 13.2.0) was optimizing out the dummy variable, therefore, not creating

Re: [PATCH] selftest: mm: Test if hugepage does not get leaked during __bio_release_pages()

2024-06-06 Thread Pankaj Raghav
> +void run_dio_using_hugetlb(unsigned int start_off, unsigned int end_off) > +{ > + int fd; > + char *buffer = NULL; > + char *orig_buffer = NULL; > + size_t h_pagesize = 0; > + size_t writesize; > + int free_hpage_b = 0; > + int free_hpage_a = 0; > + > + writesi

Re: [PATCH v4 0/7] Split a folio to any lower order folios

2024-02-16 Thread Pankaj Raghav (Samsung)
Hi Zi Yan, On Tue, Feb 13, 2024 at 04:55:13PM -0500, Zi Yan wrote: > From: Zi Yan > > Hi all, > > File folio supports any order and multi-size THP is upstreamed[1], so both > file and anonymous folios can be >0 order. Currently, split_huge_page() > only splits a huge page to order-0 pages, but

Re: [PATCH v4 0/7] Split a folio to any lower order folios

2024-02-14 Thread Pankaj Raghav (Samsung)
On Wed, Feb 14, 2024 at 12:18:14PM -0500, Zi Yan wrote: > Hi Pankaj, > > On 13 Feb 2024, at 16:55, Zi Yan wrote: > > > From: Zi Yan > > > > Hi all, > > > > File folio supports any order and multi-size THP is upstreamed[1], so both > > file and anonymous folios can be >0 order. Currently, split_h

Re: [PATCH v3 0/7] Split a folio to any lower order folios

2024-02-13 Thread Pankaj Raghav (Samsung)
Hi Zi yan, > From: Zi Yan > > Hi all, > > File folio supports any order and people would like to support flexible orders > for anonymous folio[1] too. Currently, split_huge_page() only splits a huge > page to order-0 pages, but splitting to orders higher than 0 is also useful. > This patchset a