From: Wu Fengguang <fengguang.wu@intel.com>
To: Markus <M4rkusXXL@web.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Zdenek Kabelac <zkabelac@redhat.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Lukas Hejtmanek <xhejtman@ics.muni.cz>
Subject: Re: drop_caches ...
Date: Thu, 5 Mar 2009 22:52:53 +0800 [thread overview]
Message-ID: <20090305145253.GA23945@localhost> (raw)
In-Reply-To: <200903051543.22516.M4rkusXXL@web.de>
On Thu, Mar 05, 2009 at 04:43:22PM +0200, Markus wrote:
> > > > Could you please try the attached patch which will also show the
> > > > user and process that opened these files? It adds three more
> fields
> > > > when CONFIG_PROC_FILECACHE_EXTRAS is selected.
> > > >
> > > > Thanks,
> > > > Fengguang
> > > >
> > > > On Thu, Mar 05, 2009 at 01:55:35PM +0200, Markus wrote:
> > > > >
> > > > > # sort -n -k 3 filecache-2009-03-05 | tail -n 5
> > > > > 15886 7112 7112 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > > 16209 35708 35708 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > > 16212 82128 82128 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > > 15887 340024 340024 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > > 15884 455008 455008 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > >
> > > > > The sum of the third column is 1013 MB.
> > > > > To note the biggest ones (or do you want the whole file?)... and
> > > thats
> > > > > after a sync and a drop_caches! (Can be seen in the commands
> given.)
> > >
> > > I could, but I know where these things belong to. Its from sphinx (a
> > > mysql indexer) searchd. It loads parts of the index into memory.
> > > The sizes looked well-known and killing the searchd will
> reduce "cached"
> > > to a normal amount ;)
> >
> > And it's weird about the file name: /dev/zero. I wonder how it
> > managed to create that file, and then delete it, inside a tmpfs!
>
> I dont know exactly. But in the source its just a:
> ... mmap ( NULL, m_iLength, PROT_READ | PROT_WRITE, MAP_SHARED |
> MAP_ANON, -1, 0 );
> Perhaps thats the way shared anonymous memory is handled?!
Good to know this. The corresponding kernel function is:
/**
* shmem_zero_setup - setup a shared anonymous mapping
* @vma: the vma to be mmapped is prepared by do_mmap_pgoff
*/
int shmem_zero_setup(struct vm_area_struct *vma)
{
struct file *file;
loff_t size = vma->vm_end - vma->vm_start;
file = shmem_file_setup("dev/zero", size, vma->vm_flags);
Here goes the /dev/zero ^_^
> > Just out of curiosity, are they shm objects? Can you show us the
> > output of 'df'? In your convenient time.
>
> Thats all:
> # df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/md6 14G 7.9G 5.9G 58% /
> udev 10M 304K 9.8M 3% /dev
> cachedir 4.0M 100K 4.0M 3% /lib64/splash/cache
> /dev/md4 19G 15G 3.2G 82% /home
> /dev/md3 8.3G 4.5G 3.8G 55% /usr/portage
> shm 2.0G 0 2.0G 0% /dev/shm
shm objects will be accounted here. It's clean.
Thanks,
Fengguang
WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: Markus <M4rkusXXL@web.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Zdenek Kabelac <zkabelac@redhat.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Lukas Hejtmanek <xhejtman@ics.muni.cz>
Subject: Re: drop_caches ...
Date: Thu, 5 Mar 2009 22:52:53 +0800 [thread overview]
Message-ID: <20090305145253.GA23945@localhost> (raw)
In-Reply-To: <200903051543.22516.M4rkusXXL@web.de>
On Thu, Mar 05, 2009 at 04:43:22PM +0200, Markus wrote:
> > > > Could you please try the attached patch which will also show the
> > > > user and process that opened these files? It adds three more
> fields
> > > > when CONFIG_PROC_FILECACHE_EXTRAS is selected.
> > > >
> > > > Thanks,
> > > > Fengguang
> > > >
> > > > On Thu, Mar 05, 2009 at 01:55:35PM +0200, Markus wrote:
> > > > >
> > > > > # sort -n -k 3 filecache-2009-03-05 | tail -n 5
> > > > > 15886 7112 7112 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > > 16209 35708 35708 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > > 16212 82128 82128 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > > 15887 340024 340024 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > > 15884 455008 455008 100 1 d- 00:08
> > > > > (tmpfs) /dev/zero\040(deleted)
> > > > >
> > > > > The sum of the third column is 1013 MB.
> > > > > To note the biggest ones (or do you want the whole file?)... and
> > > thats
> > > > > after a sync and a drop_caches! (Can be seen in the commands
> given.)
> > >
> > > I could, but I know where these things belong to. Its from sphinx (a
> > > mysql indexer) searchd. It loads parts of the index into memory.
> > > The sizes looked well-known and killing the searchd will
> reduce "cached"
> > > to a normal amount ;)
> >
> > And it's weird about the file name: /dev/zero. I wonder how it
> > managed to create that file, and then delete it, inside a tmpfs!
>
> I dont know exactly. But in the source its just a:
> ... mmap ( NULL, m_iLength, PROT_READ | PROT_WRITE, MAP_SHARED |
> MAP_ANON, -1, 0 );
> Perhaps thats the way shared anonymous memory is handled?!
Good to know this. The corresponding kernel function is:
/**
* shmem_zero_setup - setup a shared anonymous mapping
* @vma: the vma to be mmapped is prepared by do_mmap_pgoff
*/
int shmem_zero_setup(struct vm_area_struct *vma)
{
struct file *file;
loff_t size = vma->vm_end - vma->vm_start;
file = shmem_file_setup("dev/zero", size, vma->vm_flags);
Here goes the /dev/zero ^_^
> > Just out of curiosity, are they shm objects? Can you show us the
> > output of 'df'? In your convenient time.
>
> Thats all:
> # df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/md6 14G 7.9G 5.9G 58% /
> udev 10M 304K 9.8M 3% /dev
> cachedir 4.0M 100K 4.0M 3% /lib64/splash/cache
> /dev/md4 19G 15G 3.2G 82% /home
> /dev/md3 8.3G 4.5G 3.8G 55% /usr/portage
> shm 2.0G 0 2.0G 0% /dev/shm
shm objects will be accounted here. It's clean.
Thanks,
Fengguang
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-03-05 14:54 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 9:57 drop_caches Markus
2009-03-04 10:04 ` drop_caches Wu Fengguang
2009-03-04 10:32 ` drop_caches Markus
2009-03-04 11:05 ` drop_caches Wu Fengguang
2009-03-04 11:29 ` drop_caches Markus
2009-03-04 11:57 ` drop_caches Wu Fengguang
2009-03-04 11:57 ` drop_caches Wu Fengguang
2009-03-04 12:32 ` drop_caches Zdenek Kabelac
2009-03-04 12:32 ` drop_caches Zdenek Kabelac
2009-03-04 13:47 ` drop_caches Markus
2009-03-04 13:47 ` drop_caches Markus
2009-03-04 14:09 ` drop_caches Zdenek Kabelac
2009-03-04 14:09 ` drop_caches Zdenek Kabelac
2009-03-04 18:47 ` drop_caches Markus
2009-03-04 18:47 ` drop_caches Markus
2009-03-05 0:48 ` drop_caches Wu Fengguang
2009-03-05 0:48 ` drop_caches Wu Fengguang
2009-03-05 9:06 ` drop_caches Lukas Hejtmanek
2009-03-05 9:06 ` drop_caches Lukas Hejtmanek
2009-03-05 9:14 ` drop_caches KOSAKI Motohiro
2009-03-05 9:14 ` drop_caches KOSAKI Motohiro
2009-03-05 11:11 ` drop_caches Wu Fengguang
2009-03-05 11:11 ` drop_caches Wu Fengguang
2009-03-05 11:55 ` drop_caches Markus
2009-03-05 11:55 ` drop_caches Markus
2009-03-05 13:29 ` drop_caches Wu Fengguang
2009-03-05 14:05 ` drop_caches Markus
2009-03-05 14:05 ` drop_caches Markus
2009-03-05 14:22 ` drop_caches Wu Fengguang
2009-03-05 14:22 ` drop_caches Wu Fengguang
2009-03-05 14:43 ` drop_caches Markus
2009-03-05 14:43 ` drop_caches Markus
2009-03-05 14:52 ` Wu Fengguang [this message]
2009-03-05 14:52 ` drop_caches Wu Fengguang
2009-03-05 13:36 ` drop_caches Wu Fengguang
2009-03-05 13:36 ` drop_caches Wu Fengguang
2009-03-05 13:45 ` drop_caches Lukas Hejtmanek
2009-03-05 13:45 ` drop_caches Lukas Hejtmanek
2009-03-05 13:48 ` drop_caches Wu Fengguang
2009-03-05 13:48 ` drop_caches Wu Fengguang
2009-03-05 13:50 ` drop_caches Markus
2009-03-05 13:50 ` drop_caches Markus
2009-03-05 14:01 ` drop_caches Lukas Hejtmanek
2009-03-05 14:01 ` drop_caches Lukas Hejtmanek
2009-03-05 14:07 ` drop_caches Wu Fengguang
2009-03-05 14:07 ` drop_caches Wu Fengguang
-- strict thread matches above, loose matches on Subject: below --
2009-03-04 12:38 drop_caches Lukas Hejtmanek
2009-03-04 12:54 ` drop_caches Wu Fengguang
2009-03-04 12:54 ` drop_caches Wu Fengguang
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=20090305145253.GA23945@localhost \
--to=fengguang.wu@intel.com \
--cc=M4rkusXXL@web.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=xhejtman@ics.muni.cz \
--cc=zkabelac@redhat.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.