Skip to content

Comments

Fix test_reclaimFilePageCache to avoid tmpfs#1379

Merged
ranshid merged 4 commits intovalkey-io:unstablefrom
xbasel:fixTmpfs
Dec 17, 2024
Merged

Fix test_reclaimFilePageCache to avoid tmpfs#1379
ranshid merged 4 commits intovalkey-io:unstablefrom
xbasel:fixTmpfs

Conversation

@xbasel
Copy link
Member

@xbasel xbasel commented Dec 1, 2024

Avoid tmpfs as fadvise(FADV_DONTNEED) has no effect on memory-backed filesystems.

Fixes #897

@codecov
Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.77%. Comparing base (90475af) to head (ab267a2).
Report is 43 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1379      +/-   ##
============================================
+ Coverage     70.71%   70.77%   +0.06%     
============================================
  Files           118      119       +1     
  Lines         63386    64691    +1305     
============================================
+ Hits          44823    45787     +964     
- Misses        18563    18904     +341     

see 63 files with indirect coverage changes

Comment on lines 295 to 300
/* Check if /tmp is memory-backed (e.g., tmpfs) */
if (statfs("/tmp", &buf) == 0) {
if (buf.f_type != TMPFS_MAGIC) { // Not tmpfs, use /tmp
return "/tmp/redis-reclaim-cache-test";
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just make this check part of the test_reclaimFilePageCache and return 0 in case it is not file backed? I think forcing this test to retun 0? Honestly I would also be fine with eliminating this test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done (use tmp and only if its non-tmpfs)

xbasel and others added 4 commits December 17, 2024 17:29
Skip test when tmp is tmpfs as fadvise(FADV_DONTNEED) has
no effect on memory-backed filesystems.

Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: ranshid <88133677+ranshid@users.noreply.github.com>
Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
@ranshid ranshid merged commit 7892bf8 into valkey-io:unstable Dec 17, 2024
kronwerk pushed a commit to kronwerk/valkey that referenced this pull request Jan 27, 2025
Avoid tmpfs as fadvise(FADV_DONTNEED) has no effect on memory-backed
filesystems.

Fixes valkey-io#897

---------

Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: Ran Shidlansik <ranshid@amazon.com>
@sarthakaggarwal97 sarthakaggarwal97 moved this to To be backported in Valkey 8.0 Nov 6, 2025
roshkhatri pushed a commit to roshkhatri/valkey that referenced this pull request Jan 29, 2026
Avoid tmpfs as fadvise(FADV_DONTNEED) has no effect on memory-backed
filesystems.

Fixes valkey-io#897

---------

Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: Ran Shidlansik <ranshid@amazon.com>
roshkhatri pushed a commit to roshkhatri/valkey that referenced this pull request Jan 29, 2026
Avoid tmpfs as fadvise(FADV_DONTNEED) has no effect on memory-backed
filesystems.

Fixes valkey-io#897

---------

Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
roshkhatri pushed a commit to roshkhatri/valkey that referenced this pull request Jan 30, 2026
Avoid tmpfs as fadvise(FADV_DONTNEED) has no effect on memory-backed
filesystems.

Fixes valkey-io#897

---------

Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
@roshkhatri roshkhatri moved this from To be backported to 8.0.7 in Valkey 8.0 Jan 30, 2026
roshkhatri pushed a commit to roshkhatri/valkey that referenced this pull request Feb 4, 2026
Avoid tmpfs as fadvise(FADV_DONTNEED) has no effect on memory-backed
filesystems.

Fixes valkey-io#897

---------

Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
roshkhatri pushed a commit to roshkhatri/valkey that referenced this pull request Feb 18, 2026
Avoid tmpfs as fadvise(FADV_DONTNEED) has no effect on memory-backed
filesystems.

Fixes valkey-io#897

---------

Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
roshkhatri pushed a commit to roshkhatri/valkey that referenced this pull request Feb 20, 2026
Avoid tmpfs as fadvise(FADV_DONTNEED) has no effect on memory-backed
filesystems.

Fixes valkey-io#897

---------

Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
madolson pushed a commit that referenced this pull request Feb 24, 2026
Avoid tmpfs as fadvise(FADV_DONTNEED) has no effect on memory-backed
filesystems.

Fixes #897

---------

Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: ranshid <88133677+ranshid@users.noreply.github.com>
Co-authored-by: Ran Shidlansik <ranshid@amazon.com>
Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 8.0.7 (WIP)

Development

Successfully merging this pull request may close these issues.

[Test failure] test_reclaimFilePageCache fails on Amazon Linux 2023 AARCH64

2 participants