From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH] sysctl: Add a feature to drop caches selectively Date: Wed, 25 Jun 2014 16:30:04 +0300 Message-ID: <1403703004.20275.21.camel@sauron.fi.intel.com> References: <1403626213-7691-1-git-send-email-mcsim.planeta@gmail.com> <1403677528.7903.103.camel@sauron.fi.intel.com> <1403690184.20275.11.camel@sauron.fi.intel.com> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: David Rientjes , Maksym Planeta , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Thomas Knauth Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 2014-06-25 at 15:23 +0200, Thomas Knauth wrote: > On Wed, Jun 25, 2014 at 11:56 AM, Artem Bityutskiy 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. No, I do not ask to implement this, just trying to understand how the interface could possibly be extended. -- Best Regards, Artem Bityutskiy