lkml.org 
[lkml]   [2009]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] NOMMU: Pages allocated to a ramfs inode's pagecache may get wrongly discarded
On Fri, Mar 13, 2009 at 05:15:44PM +0900, KOSAKI Motohiro wrote:
> > > > > The ramfs stuff is rather icky in that it adds the pages to the aging
> > > > > list, marks them dirty, but does not provide a writeout method.
> > > > >
> > > > > This will make the paging code scan over them (continuously) trying to
> > > > > clean them, failing that (lack of writeout method) and putting them back
> > > > > on the list.
> > > > >
> > > > > Not requiring the pages to be added to the LRU would be a really good idea.
> > > > > They are not discardable, be it in MMU or NOMMU mode, except when the inode
> > > > > itself is discarded.
> > > >
> > > > Yep, these pages shouldn't be on the LRU at all. I guess that will
> > > > require some tweaks to core filemap.c code.
> > >
> > > IMHO, UNEVICTABLE_LRU already does lru isolation.
> > > only rest prblem is, getting rid of "depends on MMU" line in mm/Kconfig.
> > >
> > > Am I missing anything?
> >
> > Yes, the need to take something off that shouldn't be there to begin
> > with.
>
> In past unevictable lru discussion, we discuss the same thing.
> at that time, we found two reason of unevictable lru is better than
> completely taking off.
>
> (1) page migration code depend on the page stay on lru.
> (2) "taking off at reclaim time" can avoid adding lock to fastpath.
> anyway, complely removing from lru need something lock.
> we disliked it at that time.

Agreed with (1). NOMMU can't support migration, though. But keeping
them off the LRU on NOMMU needs adjustment of the page cache
read/write code in mm/filemap.c.

I'm not quite sure I understand (2). But never adding these pages on
the LRU means we never have to remove them anywhere, no?

Hannes


\
 
 \ /
  Last update: 2009-03-13 11:49    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site