ささださんの日記(http://www.atdot.net/~ko1/diary/200908.html#cs-22)でsodaさんにコメントもらったけど
現在のglibcは posix_madvise(POSIX_MADV_DONTNEED) が呼ばれた時に単に無視している。
Linuxのmadvise(MADV_DONTNEED) がPOSIX違反なのは知ってたけど、これは気づかなかった。

glibc-2.10.1/sysdeps/unix/sysv/linux/posix_madvise.c

int
posix_madvise (void *addr, size_t len, int advice)
{
/* We have one problem: the kernel's MADV_DONTNEED does not
correspond to POSIX's POSIX_MADV_DONTNEED. The former simply
discards changes made to the memory without writing it back to
disk, if this would be necessary. The POSIX behavior does not
allow this. There is no functionality mapping the POSIX behavior
so far so we ignore that advice for now. */
if (advice == POSIX_MADV_DONTNEED)
return 0;

INTERNAL_SYSCALL_DECL (err);
int result = INTERNAL_SYSCALL (madvise, err, 3, addr, len, advice);
return INTERNAL_SYSCALL_ERRNO (result, err);
}



でも、普通の人は posix_madvise() じゃなくて、 madvise() 使ってるからこんな修正
全然意味ないよ。
POSIX互換テスト対策にすぎないんじゃね。という気がするな