All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: John Stoffel <john@stoffel.org>
Cc: "KOSAKI Motohiro" <kosaki.motohiro@gmail.com>,
	"Pádraig Brady" <P@draigBrady.com>,
	linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Cong Wang" <xiyou.wangcong@gmail.com>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Matthew Wilcox" <matthew@wil.cx>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC Patch] fs: implement per-file drop caches
Date: Mon, 04 Jun 2012 11:28:24 +0800	[thread overview]
Message-ID: <1338780504.25653.18.camel@cr0> (raw)
In-Reply-To: <20424.48827.778644.310736@quad.stoffel.home>

On Fri, 2012-06-01 at 09:08 -0400, John Stoffel wrote:
> >>>>> "Cong" == Cong Wang <amwang@redhat.com> writes:
> 
> Cong> Yeah, at least John Stoffel expressed his interests on this, as
> Cong> a sysadmin. So I believe there are some people need it.
> 
> 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.  
> 
> Cong> Now the problem is that I don't find a proper existing utility
> Cong> to patch, maybe Pádraig 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?
> 
> 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.
> 
> 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Cong Wang <amwang@redhat.com>
To: John Stoffel <john@stoffel.org>
Cc: "KOSAKI Motohiro" <kosaki.motohiro@gmail.com>,
	"Pádraig Brady" <P@draigBrady.com>,
	linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Cong Wang" <xiyou.wangcong@gmail.com>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Matthew Wilcox" <matthew@wil.cx>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC Patch] fs: implement per-file drop caches
Date: Mon, 04 Jun 2012 11:28:24 +0800	[thread overview]
Message-ID: <1338780504.25653.18.camel@cr0> (raw)
In-Reply-To: <20424.48827.778644.310736@quad.stoffel.home>

On Fri, 2012-06-01 at 09:08 -0400, John Stoffel wrote:
> >>>>> "Cong" == Cong Wang <amwang@redhat.com> writes:
> 
> Cong> Yeah, at least John Stoffel expressed his interests on this, as
> Cong> a sysadmin. So I believe there are some people need it.
> 
> 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.  
> 
> Cong> Now the problem is that I don't find a proper existing utility
> Cong> to patch, maybe PA!draig 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?
> 
> 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.
> 
> 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Cong Wang <amwang@redhat.com>
To: John Stoffel <john@stoffel.org>
Cc: "KOSAKI Motohiro" <kosaki.motohiro@gmail.com>,
	"Pádraig Brady" <P@draigBrady.com>,
	linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Cong Wang" <xiyou.wangcong@gmail.com>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Matthew Wilcox" <matthew@wil.cx>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC Patch] fs: implement per-file drop caches
Date: Mon, 04 Jun 2012 11:28:24 +0800	[thread overview]
Message-ID: <1338780504.25653.18.camel@cr0> (raw)
In-Reply-To: <20424.48827.778644.310736@quad.stoffel.home>

On Fri, 2012-06-01 at 09:08 -0400, John Stoffel wrote:
> >>>>> "Cong" == Cong Wang <amwang@redhat.com> writes:
> 
> Cong> Yeah, at least John Stoffel expressed his interests on this, as
> Cong> a sysadmin. So I believe there are some people need it.
> 
> 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.  
> 
> Cong> Now the problem is that I don't find a proper existing utility
> Cong> to patch, maybe Pádraig 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?
> 
> 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.
> 
> 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!


  reply	other threads:[~2012-06-04  3:28 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30 13:38 [RFC Patch] fs: implement per-file drop caches Cong Wang
2012-05-30 13:38 ` Cong Wang
2012-05-30 15:12 ` John Stoffel
2012-05-30 15:12   ` John Stoffel
2012-05-31  6:28   ` Cong Wang
2012-05-31  6:28     ` Cong Wang
2012-05-30 15:14 ` Pádraig Brady
2012-05-30 15:14   ` Pádraig Brady
2012-05-30 15:14   ` Pádraig Brady
2012-05-31  6:20   ` Cong Wang
2012-05-31  6:20     ` Cong Wang
2012-05-31  6:20     ` Cong Wang
2012-05-31  6:30     ` KOSAKI Motohiro
2012-05-31  6:30       ` KOSAKI Motohiro
2012-05-31  6:30       ` KOSAKI Motohiro
2012-05-31 12:11       ` Cong Wang
2012-05-31 12:11         ` Cong Wang
2012-05-31 12:11         ` Cong Wang
2012-05-31 19:09         ` KOSAKI Motohiro
2012-05-31 19:09           ` KOSAKI Motohiro
2012-05-31 19:09           ` KOSAKI Motohiro
2012-06-01 11:32           ` Cong Wang
2012-06-01 11:32             ` Cong Wang
2012-06-01 11:32             ` Cong Wang
2012-06-01 13:08             ` John Stoffel
2012-06-01 13:08               ` John Stoffel
2012-06-04  3:28               ` Cong Wang [this message]
2012-06-04  3:28                 ` Cong Wang
2012-06-04  3:28                 ` Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1338780504.25653.18.camel@cr0 \
    --to=amwang@redhat.com \
    --cc=P@draigBrady.com \
    --cc=akpm@linux-foundation.org \
    --cc=john@stoffel.org \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew@wil.cx \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.