Re: [PATCH 0/5] mm improvements

Nikita Danilov
2004-02-04T13:25:48Z

Nick Piggin writes:
> Patches against 2.6.2-rc3-mm1.
> Please test / review / comment.

Hello, Nick,

I composed a new patch that may be worth trying:

ftp://ftp.namesys.com/pub/misc-patches/unsupported/extra/2004.02.04/p12-dont-unmap-on-pageout.patch

It avoids (if possible) unmapping dirty page before calling
->writepage(). Intention is to avoid minor page faults for the pages
under write-back.

To this end new function mm/rmap.c:page_is_dirty() is added that scans
page's ptes and transfers their dirtiness to the struct page
itself. page_is_dirty() is called by shrink_list() and page is unmapped
only if page_is_dirty() found all ptes clean.

Few points:

1. I only gave it light testing (compared with other patches in the
"extra" series).

2. dont-unmap-on-pageout logically depends on check-pte-dirty, and
textually on skip-writepage patches.

3. for some unimportant reasons patches were produces with "diff -b",
and may, hence, require "patch -l" to apply.

4. I found that shmem_writepage() has BUG_ON(page_mapped(page))
check. Its removal had no effect, and I am not sure why the check was
there at all.

Nikita.