On Wed, 01 Oct 2014 11:45:47 -0400, Jeff Moyer said: > This sounds an awful lot like posix_fadvise' POSIX_FADV_NOREUSE flag. Gaah. Premature click. man posix_fadvise says this: In kernels before 2.6.18, POSIX_FADV_NOREUSE had the same semantics as POSIX_FADV_WILLNEED. This was probably a bug; since kernel 2.6.18, this flag is a no-op. and mm/fadvise.c says this: switch (advice) { case POSIX_FADV_NORMAL: f.file->f_ra.ra_pages = bdi->ra_pages; spin_lock(&f.file->f_lock); f.file->f_mode &= ~FMODE_RANDOM; spin_unlock(&f.file->f_lock); ... */ force_page_cache_readahead(mapping, f.file, start_index, nrpages); break; case POSIX_FADV_NOREUSE: break; case POSIX_FADV_DONTNEED: if (!bdi_write_congested(mapping->backing_dev_info)) __filemap_fdatawrite_range(mapping, offset, endbyte, WB_SYNC_NONE); /* First and last FULL page! */ So... not much interface there, actually. One wonders if removing the 'break;' and allowing a fall-through would actually be an improvement....
Attachment:
pgp1md1GG2QSn.pgp
Description: PGP signature