On 2/4/07, Christoph Lameter <clameter@sgi.com> wrote:
I don't understand why you want to account mlocked pages in
dirty_ratio. of course mlocked pages *can* be dirty, but they have no
relevance in the write throttling code. the point of dirty ratio is
to guarantee that there are some number of non-dirty, non-pinned,
non-mlocked pages on the LRU, to (try to) avoid deadlocks where the
writeback path needs to allocate pages, which many filesystems like to
do. if an mlocked page is clean, there's still no way to free it up,
so it should not be treated as being on the LRU at all, for write
throttling. the ideal (IMO) dirty ratio would be
NR_DIRTY - NR_DIRTY_MLOCKED + NR_UNSTABLE_NFS
/
NR_FREE_PAGES + NR_INACTIVE + NR_ACTIVE
obviously it's kinda useless to keep an NR_DIRTY_MLOCKED counter, any
of these mlock accounting schemes could easily be modified to update
the NR_DIRTY counter so that it only reflects dirty unpinned pages,
and not mlocked ones.
is that the only place you wanted to have an accurate mocked page count?
NATE
-