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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu,  6 Jun 2024 20:36:19 +0000 "Pankaj Raghav (Samsung)" <kernel@xxxxxxxxxxxxxxxx> wrote:

> From: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
> 
> 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 huge page in the page cache.
> 
> Use asm volatile() trick to force the compiler not to optimize out
> the loop where we read from the mmaped addr. This is similar to what is
> being done in other tests (cow.c, etc)
> 
> As the variable is now used in the asm statement, remove the unused
> attribute.
> 

What are the runtime effects of this change?  An inappropriate test
failure?  If so, shouldn't we fix 6.9.x kernels also?  And is
fc4d182316bd ("mm: huge_memory: enable debugfs to split huge pages to
any order") an appropriate Fixes: target?





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux