Bug 6282
Summary: | wrong madvise(MADV_DONTNEED) semantic | ||
---|---|---|---|
Product: | Memory Management | Reporter: | Samuel Thibault (samuel.thibault) |
Component: | Other | Assignee: | Natalie Protasevich (protasnb) |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | protasnb, xerofoify |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | any since madvise implementation (somewhere in 2.4) | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
initialization dmesg (in case it can be useful)
additionnal dmesg on modprobe atyfb testcase |
Description
Samuel Thibault
2006-03-24 14:42:44 UTC
Please take it to linux-kernel. Include the testcase if poss, thanks. URL of thread: http://marc.theaimsgroup.com/?t=111996860600002&r=1&w=2&n=13 Created attachment 7667 [details]
initialization dmesg (in case it can be useful)
Created attachment 7668 [details]
additionnal dmesg on modprobe atyfb
Comment on attachment 7667 [details]
initialization dmesg (in case it can be useful)
Oops, wrong bug report
Comment on attachment 7668 [details]
additionnal dmesg on modprobe atyfb
Oops, wrong bug report
See glibc bug http://sourceware.org/bugzilla/show_bug.cgi?id=3458 Drepper "fixed" the issue for now by ignoring MADV_DONTNEED advice. Note: that of course does not mean that we shouldn't implement something that really is what POSIX expects from MADV_DONTNEED Samuel, have you tried advice in #1 about posting this to LKML? Thanks. See http://marc.info/?l=linux-kernel&m=114324188901936&w=2 but no luck. There are related threads: http://marc.info/?l=linux-kernel&m=117561753326551&w=2 http://marc.info/?l=linux-kernel&m=117626557716611&w=2 http://marc.info/?l=linux-kernel&m=117679424209965&w=2 http://marc.info/?l=linux-kernel&m=117798097213454&w=2 And they indeed agree that our MADV_DONTNEED is not POSIX and that we should add a POSIX_MADV_DONTNEED, but don't do anything about it. So it looks like yes, the issue was raised and people know about it, but nobody really cares and glibc is still wrapping it with a nop... This bug is very old. Please try on newer kernel. Cheers Nick Created attachment 141411 [details]
testcase
Hello,
Yes, this is still a problem on Linux 3.15. I have attached again the
testcase, which is still emitting "FAILED".
Samuel
I have read your test case and would like to known on what lines it's failing or does it just fail all togethor. Nick Here is the output I get: c = 00204a16 file msync: NO madvise: NO ok c = 05542a27 file msync: YES madvise: NO ok c = 169c39e2 file msync: NO madvise: YES FAILED c = 2eab4956 file msync: YES madvise: YES FAILED c = 0bb0b8b4 anonymous msync: NO madvise: NO ok c = 0bd068c9 anonymous msync: YES madvise: NO ok c = 3e5d224d anonymous msync: NO madvise: YES FAILED c = 436c8d9c anonymous msync: YES madvise: YES FAILED Whenever madvise(MADV_DONTNEED) is called, the value of the cookie gets lost. |