From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [RFC Patch] fs: implement per-file drop caches Date: Mon, 04 Jun 2012 11:28:24 +0800 Message-ID: <1338780504.25653.18.camel@cr0> References: <1338385120-14519-1-git-send-email-amwang@redhat.com> <4FC6393B.7090105@draigBrady.com> <1338445233.19369.21.camel@cr0> <4FC70FFE.50809@gmail.com> <1338466281.19369.44.camel@cr0> <4FC7C1CD.7020701@gmail.com> <1338550337.17012.27.camel@cr0> <20424.48827.778644.310736@quad.stoffel.home> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: KOSAKI Motohiro , =?ISO-8859-1?Q?P=E1draig?= Brady , linux-kernel@vger.kernel.org, Andrew Morton , Cong Wang , Alexander Viro , Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org To: John Stoffel Return-path: In-Reply-To: <20424.48827.778644.310736@quad.stoffel.home> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Fri, 2012-06-01 at 09:08 -0400, John Stoffel wrote: > >>>>> "Cong" =3D=3D Cong Wang writes: >=20 > Cong> Yeah, at least John Stoffel expressed his interests on this, as > Cong> a sysadmin. So I believe there are some people need it. >=20 > I expressed an interest if there was a way to usefully *find* the > processes that are hogging cache. Without a reporting mechanism of > cache usage on per-file or per-process manner, then I don't see a > great use for this. It's just simpler to drop all the caches when you > hit a wall. =20 >=20 > Cong> Now the problem is that I don't find a proper existing utility > Cong> to patch, maybe P=C3=A1draig has any hints on this? Could this > Cong> feature be merged into some core utility? Or I have to write a > Cong> new utility for this? >=20 > I'd write a new tutorial utility, maybe you could call it 'cache_top' > and have it both show the biggest users of cache, as well as exposing > your new ability to drop the cache on a per-fd basis. >=20 > It's really not much use unless we can measure it. Fair enough. We could do that with Keiichi's page cache tracepoint patches: https://lkml.org/lkml/2011/7/18/326 with that patch, we can measure page caches with `perf`. I tried to carry Keiichi's patches, but those patch depend on other patches too, the main problem is still translating the inode number to file name for user-space users to read, which is not trivial at all. Also, will vmtouch work for you too? You can get it at http://hoytech.com/vmtouch/ I can patch it too if you want. Thanks! -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter= .ca/ Don't email: email@kvack.org