lkml.org 
[lkml]   [2014]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] sysctl: Add a feature to drop caches selectively
From
On Wed, Jun 25, 2014 at 11:56 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> Thanks for the answer, although you forgot to comment on the question
> about possibly extending the new interface to work with file ranges in
> the future. For example, I have a 2 TiB file, and I am only interested
> in dropping caches for the first couple of gigabytes. Would I extend
> your interface, or would I come up with another one?

Ah, didn't quite understand what was meant with file ranges. Again, we
had not considered this so far. I guess you could make a distinction
between directories and files here. If the path points to a file, you
can have an optional argument indicating the range of bytes you would
like to drop. Something like

echo "my-file 0-1000,8000-1000" > /proc/sys/vm/sdrop_cache

If this is desirable, we can add it to the patch.


\
 
 \ /
  Last update: 2014-06-25 16:01    [W:0.253 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site