lkml.org 
[lkml]   [2002]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Can prune_icache safely discard inodes which have only clean pages? (2.4.18)
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.043 / U:2.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site