From: Andrew Morton <akpm@digeo.com>
To: Bill Davenport <dragonpt@rcn.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Can prune_icache safely discard inodes which have only clean pages? (2.4.18)
Date: Fri, 13 Sep 2002 12:57:36 -0700 [thread overview]
Message-ID: <3D824330.6BC374E7@digeo.com> (raw)
In-Reply-To: 005a01c25b1b$ac7fb390$3083accf@tabasco
Bill Davenport wrote:
>
> I've got a system which has a fairly large amount of physical memory (2GB)
> that experiences
> performance problems after a large number of files have been accessed.
>
> ...
Your analysis is 100% correct. It's a problem.
There's a fix for this in Andrea's kernel.
> ...
>
> and I'd like to change it to:
>
> void prune_icache(int goal)
> {
> ...
> while (entry != &inode_unused)
> {
> ...
> if (inode->i_state & (I_FREEING|I_CLEAR|I_LOCK))
> continue;
> if ((inode->i_state != 0) || inode_has_buffers(inode))
> continue;
> if (inode->i_data.nrpages != 0) {
> if ((!list_empty(&inode->i_data.dirty_pages)) ||
> (!list_empty(&inode->i_data.locked_pages))) {
> /* skip if any dirty or locked pages */
> continue;
> }
> }
locked_pages tends to hold clean, unlocked pages, alas. Testing
->dirty_pages makes sense.
If there are no dirty pages then you can run invalidate_inode_pages();
chances are, that will bring ->nrpages to zero, and all is well.
prev parent reply other threads:[~2002-09-13 19:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-13 11:49 Can prune_icache safely discard inodes which have only clean pages? (2.4.18) Bill Davenport
2002-09-13 19:57 ` Andrew Morton [this message]
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=3D824330.6BC374E7@digeo.com \
--to=akpm@digeo.com \
--cc=dragonpt@rcn.com \
--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