Re: [RFC Patch] fs: implement per-file drop caches

From: Cong Wang
Date: Thu May 31 2012 - 02:28:33 EST


On Wed, 2012-05-30 at 11:12 -0400, John Stoffel wrote:
> Cong> This is a draft patch of implementing per-file drop caches.
>
> Interesting. So can I do this from outside a process? I'm a
> SysAdmin, so my POV is from noticing, finding and fixing performance
> problems when the system is under pressure.

Yes, sure, we need to write a utility (or patch an existing one) to do
this for you admins.

>
> Cong> It introduces a new fcntl command F_DROP_CACHES to drop
> Cong> file caches of a specific file. The reason is that currently
> Cong> we only have a system-wide drop caches interface, it could
> Cong> cause system-wide performance down if we drop all page caches
> Cong> when we actually want to drop the caches of some huge file.
>
> How can I tell how much cache is used by a file? And what is the
> performance impact of this when run on a busy system? And what does
> this patch buy us since I figure the VM should already be dropping
> caches once the system comes under mem pressure...
>

AFAIK, we don't export such information to user-space, we only have
system-wide statistics.

Keiichi (in Cc) once wrote a patch to implement page cache tracepoint:
http://marc.info/?l=linux-mm&m=131102496904326&w=3

but the patches are still not in upstream.

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/