All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Lenky Gao <lenky.gao@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Inactive memory keep growing and how to release it?
Date: Tue, 12 Mar 2013 16:37:11 +0800	[thread overview]
Message-ID: <20130312083711.GA1943@gmail.com> (raw)
In-Reply-To: <CAAO_Xo5g2LR54ry=SU7UhGbv-chdkdd6foq+-LjnuE8yAj8ikg@mail.gmail.com>

Hi Gao,

On Tue, Mar 12, 2013 at 02:58:24PM +0800, Lenky Gao wrote:
> Hi,
> 
> When i just run a test on Centos 6.2 as follows:
> ################################
> #!/bin/bash
> 
> while true
> do
> 
>         file="/tmp/filetest"
> 
>         echo $file
> 
>         dd if=/dev/zero of=${file} bs=512 count=204800 &> /dev/null
> 
>         sleep 5
> done
> ################################
> 
> the inactive memory keep growing:
> 
> #cat /proc/meminfo | grep Inactive\(fi
> Inactive(file):   420144 kB
> ...
> #cat /proc/meminfo | grep Inactive\(fi
> Inactive(file):   554662 kB
> ...
> #cat /proc/meminfo | grep Inactive\(fi
> Inactive(file):   882824 kB
> 
> and i cannot reclaim it:
> 
> # cat /proc/meminfo | grep Inactive\(file\);
> Inactive(file):   882824 kB
> # sync;
> # echo 3 > /proc/sys/vm/drop_caches
> # cat /proc/meminfo | grep Inactive\(file\);
> Inactive(file):   777664 kB
> 
> My file system type is ext3, mounted with the option data=journal and
> it is easy to reproduce. If the mount option is data=ordered,
> reproducing this problom need more time. Because of the problom, when
> in the final situation, i cannot kmalloc a larger contiguous memory,
> especially in interrupt context. I have tested on other version
> kernel, such as 2.6.30 and 3.6.11, the problom also exists.
> 
> Is this a bug?

I don't think it is a bug.  If I understand correctly, when you try to
reclaim memory (sync and drop caches), the test script is still running,
right?  If so, that means that some memory will be re-dirtied again.  So
the number of inactive pages could not reduce as you expected.

Regards,
                                                - Zheng

  parent reply	other threads:[~2013-03-12  8:21 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12  6:58 Inactive memory keep growing and how to release it? Lenky Gao
2013-03-12  7:41 ` a problem about ext4 zhuyj
2013-03-12  7:49   ` zhuyj
2013-03-12  8:13     ` zhuyj
2013-03-12 13:42   ` Theodore Ts'o
2013-03-13  3:24     ` Ext4:can not rm directories on 2.6.3x zhuyj
2013-03-15  7:16       ` zhuyj
2013-03-15 14:53         ` Theodore Ts'o
2013-03-15 14:56           ` Willy Tarreau
2013-03-15 14:59             ` Theodore Ts'o
2013-03-15 15:12           ` Paul Gortmaker
2013-03-12  8:37 ` Zheng Liu [this message]
2013-03-12  8:48   ` Inactive memory keep growing and how to release it? Lenky Gao
2013-03-14  8:00   ` Lenky Gao
  -- strict thread matches above, loose matches on Subject: below --
2013-03-04  9:52 Lenky Gao
2013-03-04  9:52 ` Lenky Gao
2013-03-04 10:41 ` Zlatko Calusic
2013-03-04 10:41   ` Zlatko Calusic
2013-03-04 12:21   ` Lenky Gao
2013-03-04 12:21     ` Lenky Gao
2013-03-09  2:14     ` Will Huck
2013-03-09  2:14       ` Will Huck
2013-03-14 12:39       ` Hillf Danton
2013-03-14 12:39         ` Hillf Danton
2013-03-14 15:07         ` Lenky Gao
2013-03-14 15:07           ` Lenky Gao
2013-03-15  8:51         ` Simon Jeons
2013-03-15  8:51           ` Simon Jeons
2013-03-14 10:14 ` Michal Hocko
2013-03-14 10:14   ` Michal Hocko
2013-03-15  8:41   ` Simon Jeons
2013-03-15  8:41     ` Simon Jeons
2013-03-15 15:00     ` Theodore Ts'o
2013-03-15 15:00       ` Theodore Ts'o

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=20130312083711.GA1943@gmail.com \
    --to=gnehzuil.liu@gmail.com \
    --cc=lenky.gao@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    /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.