Skip to content

RFC Volatile Ranges (v6)

John Stultz lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Range tree implementationinclude/linux/rangetree.h lib/Makefile lib/rangetree.c+185 -13 replies
2/2fadvise: Add _VOLATILE,_ISVOLATILE, and _NONVOLATILE flagsfs/inode.c include/linux/fadvise.h include/linux/volatile.h +3 more+477 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] [RFC] Volatile Ranges (v6)

Just wanted to send out another iteration of the volatile range code for review and comment.

This revision handles some improved coalescing logic, fixes some bugs in the range tree management, and also utilizes a hash tabe to avoid bloating the address_space structure with range_tree pointers.

Still looking for guidence on what a better interface for this might be as well as thoughts on how to best drop the ranges under memory pressure (vmtruncate_region is pretty close to what I want, but lockdep makes it clear that its not really safe to call from a shrinker).

Another detail is that by hanging the volatile ranges off of the address_space, the volatility for tmpfs files persists even when no one has an open fd on the file. This could cause some surprises if application A marked some pages volatile and died, then application B opened the file and had pages dropped out underneith it while it was being used. I suspect I need to clean up the volatility when all fds are dropped. But any extra insight would be useful here.

Thanks for the continued advice and feedback!
-john

CC Andrew Morton <[email protected]>
CC Android Kernel Team <[email protected]>
CC Robert Love <[email protected]>
CC Mel Gorman <[email protected]>
CC Hugh Dickins <[email protected]>
CC Dave Hansen <[email protected]>
CC Rik van Riel <[email protected]>
CC Dmitry Adamushko <[email protected]>
CC Dave Chinner <[email protected]>
CC Neil Brown <[email protected]>
CC Andrea Righi <[email protected]>
CC Aneesh Kumar K.V <[email protected]>

John Stultz (2):
[RFC] Range tree implementation
[RFC] fadvise: Add _VOLATILE,_ISVOLATILE, and _NONVOLATILE flags

 fs/inode.c                |    2 +
 include/linux/fadvise.h   |    5 +
 include/linux/rangetree.h |   56 ++++++
 include/linux/volatile.h  |   14 ++
 lib/Makefile              |    2 +-
 lib/rangetree.c           |  128 +++++++++++++
 mm/Makefile               |    2 +-
 mm/fadvise.c              |   16 ++-
 mm/volatile.c             |  440 +++++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 662 insertions(+), 3 deletions(-)
 create mode 100644 include/linux/rangetree.h
 create mode 100644 include/linux/volatile.h
 create mode 100644 lib/rangetree.c
 create mode 100644 mm/volatile.c
Signature · 1 line
1.7.3.2.146.gca209