Messages in this thread |  | | Date | Fri, 13 Sep 2002 12:57:36 -0700 | From | Andrew Morton <> | Subject | Re: 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/
|  |