lkml.org 
[lkml]   [2014]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v11 00/21] Add support for NV-DIMMs to ext4
From
Date
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....
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-10-01 20:01    [W:0.114 / U:1.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site