From: "Xin Zhao" <uszhaoxin@gmail.com>
To: "Jan Engelhardt" <jengelh@linux01.gwdg.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: Can someone explain under what condition inode cache pages can be swapped out?
Date: Thu, 3 Aug 2006 11:32:33 -0400 [thread overview]
Message-ID: <4ae3c140608030832n2124b8abu479b7b4ae3eda1f@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0608030951270.32738@yvahk01.tjqt.qr>
Many thanks for kind replies.
You said inode cache is never swapped at all. In other words, the
inode cache pages are not swappable. How do you know the pages are
never swapped out? How can I tell whether a specific memory page is
swappable? Can you point me to the right place in the kernel so that
I can see more details?
If my understanding is right, inode cache shrinker only frees the
reclaimable inodes, which means, if a lot of files are opened when
shrinker is activated, the shrinker may not find sufficient
reclaimable inodes to free enough space. What will Linux do under such
condition?
Xin
On 8/3/06, Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
>
>
> >
> > Specifically, how a swaping system determine which page should be
> > swapped out when memory is tight?
>
> LRU, f.ex.
>
> > Intuitively, I think inode cache
> > pages should be swapped out as late as possible.
>
> I believe they are not swapped at all - they are shrunk when memory becomes
> a premium. (If this was a math class I'd say the cache size will be zero,
> although that's not too realistic in practice)
>
> > But how Linux mkae
> > decision on this? Why linux does not pin inode pages in the memory?
>
> Ugh hell no. Then you could trigger OOM by simply walking a big filesystem.
>
>
> Jan Engelhardt
> --
>
next prev parent reply other threads:[~2006-08-03 15:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-03 6:15 Xin Zhao
2006-08-03 7:55 ` Jan Engelhardt
2006-08-03 15:32 ` Xin Zhao [this message]
2006-08-04 5:58 ` Jan Engelhardt
2006-08-04 14:44 ` Al Boldi
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=4ae3c140608030832n2124b8abu479b7b4ae3eda1f@mail.gmail.com \
--to=uszhaoxin@gmail.com \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®