lkml.org 
[lkml]   [2001]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: broken VM in 2.4.10-pre9
Date
On September 16, 2001 09:43 pm, Linus Torvalds wrote:
> The fact that the "use-once" logic didn't kick in is the problem. It's
> hard to tell _why_ it didn't kick in, possibly because the MP3 player
> read small chunks of the pages (touching them multiple times).

Can we confirm that the mp3 player is making subpage accesses? (strace)

The 'partially read/written' state isn't handled properly now. The
transition to the 'used-once' state should only occur if the transfer ends at
the exact end of the page. Right now it always takes place after the *first*
transfer on the page which is correct only for full-page transfers.

It's still best to start all pages unreferenced, because otherwise we don't
have a means of distinguishing between the first and subsequent page cache
lookups. The check_used_once logic should set the page referenced if the IO
transfer ends in the interior of the page or unreferenced if it ends at the
end of the page.

This straightforward to fix, I'll have a tested patch by Tuesday if nobody
beats me to it. I don't think this is the whole problem though, it's just
exposing a balancing problem. Even if I did go and randomly access a huge
file so that all cache pages have high age (the effect we're simulating by
accident here) I still shouldn't be able to drive all my swap pages out of
memory.

--
Daniel





-
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:03    [from the cache]
©2003-2011 Jasper Spaans