From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753047AbaBGR5M (ORCPT ); Fri, 7 Feb 2014 12:57:12 -0500 Received: from mta-out.inet.fi ([195.156.147.13]:43428 "EHLO jenni1.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147AbaBGR5L (ORCPT ); Fri, 7 Feb 2014 12:57:11 -0500 Date: Fri, 7 Feb 2014 19:56:22 +0200 From: "Kirill A. Shutemov" To: Andi Kleen Cc: Linus Torvalds , Peter Anvin , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , the arch/x86 maintainers , Linux Kernel Mailing List , Ning Qu , Dave Hansen , Matthew Wilcox Subject: Re: [RFC, PATCH] mm: map few pages around fault address if they are in page cache Message-ID: <20140207175622.GA14953@node.dhcp.inet.fi> References: <20140206005534.GA27848@node.dhcp.inet.fi> <20140206222450.GA8823@node.dhcp.inet.fi> <20140207154232.GA18611@node.dhcp.inet.fi> <20140207173200.GC12219@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140207173200.GC12219@tassilo.jf.intel.com> User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 07, 2014 at 09:32:00AM -0800, Andi Kleen wrote: > > I haven't tested it much, but my kvm boots. There're few places where code > > should be fixed. __do_fault() and filemap_fault() are too ugly and need to > > be cleaned. > > > > I don't have any performance data yet. > > > > Any thoughts? > > It seems very drastic to do it unconditionally. How about at least a simple > stream detection heuristic and perhaps also madvise? We already have readahead here it can be reused here. But see below. > There are some extreme cases where workloads could use a lot more memory > than before, if they access their memory sparsely in the right pattern. Have you noticied that we don't actually allocate any memory: only reuse what's already there. Sure, it will increase VmSize, but do we care? -- Kirill A. Shutemov