linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC, PATCH 0/2] mm: map few pages around fault address if they are in page cache
@ 2014-02-11  3:05 Kirill A. Shutemov
  2014-02-11  3:05 ` [PATCH 1/2] mm: extend ->fault interface to fault in few pages around fault address Kirill A. Shutemov
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Kirill A. Shutemov @ 2014-02-11  3:05 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Mel Gorman, Rik van Riel
  Cc: Andi Kleen, Matthew Wilcox, Dave Hansen, linux-mm,
	Kirill A. Shutemov

Okay, it's RFC only. I haven't stabilize it yet. And it's 5 AM...

It kind of work on small test-cases in kvm, but hung my laptop shortly
after boot. So no benchmark data.

The patches are on top of mine __do_fault() cleanup.

The idea is to minimize number of minor page faults by mapping pages around
the fault address if they are already in page cache.

With the patches we try to map up to 32 pages (subject to change) on read
page fault. Later can extended to write page faults to shared mappings if
works well.

The pages must be on the same page table so we can change all ptes under
one lock.

I tried to avoid additional latency, so we don't wait page to get ready,
just skip to the next one.

The only place where we can get stuck for relatively long time is
do_async_mmap_readahead(): it allocates pages and submits IO. We can't
just skip readahead, otherwise it will stop working and we will get miss
all the time. On other hand keeping do_async_mmap_readahead() there will
probably break readahead heuristics: interleaving access looks as
sequential.

Any comments are welcome.

Kirill A. Shutemov (2):
  mm: extend ->fault interface to fault in few pages around fault
    address
  mm: implement FAULT_FLAG_AROUND in filemap_fault()

 include/linux/mm.h | 24 +++++++++++++++++
 mm/filemap.c       | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 mm/memory.c        | 61 +++++++++++++++++++++++++++++++++++++-----
 3 files changed, 152 insertions(+), 10 deletions(-)

-- 
1.8.5.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-02-12  0:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11  3:05 [RFC, PATCH 0/2] mm: map few pages around fault address if they are in page cache Kirill A. Shutemov
2014-02-11  3:05 ` [PATCH 1/2] mm: extend ->fault interface to fault in few pages around fault address Kirill A. Shutemov
2014-02-11  3:05 ` [PATCH 2/2] mm: implement FAULT_FLAG_AROUND in filemap_fault() Kirill A. Shutemov
2014-02-11 21:39 ` [RFC, PATCH 0/2] mm: map few pages around fault address if they are in page cache Andrew Morton
2014-02-11 23:52   ` Linus Torvalds
2014-02-11 23:58     ` Kirill A. Shutemov
2014-02-12  0:25       ` Linus Torvalds
2014-02-12  0:44         ` Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).