Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754599AbaBQUYK (ORCPT ); Mon, 17 Feb 2014 15:24:10 -0500 Received: from mail-ve0-f169.google.com ([209.85.128.169]:36114 "EHLO mail-ve0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754541AbaBQUYF (ORCPT ); Mon, 17 Feb 2014 15:24:05 -0500 MIME-Version: 1.0 In-Reply-To: <20140217194955.GA30908@node.dhcp.inet.fi> References: <1392662333-25470-1-git-send-email-kirill.shutemov@linux.intel.com> <20140217194955.GA30908@node.dhcp.inet.fi> Date: Mon, 17 Feb 2014 12:24:04 -0800 X-Google-Sender-Auth: _7PwvCjTPyh4RTgO0CE51UiJrWM Message-ID: Subject: Re: [RFC, PATCHv2 0/2] mm: map few pages around fault address if they are in page cache From: Linus Torvalds To: "Kirill A. Shutemov" Cc: "Kirill A. Shutemov" , Andrew Morton , Mel Gorman , Rik van Riel , Andi Kleen , Matthew Wilcox , Dave Hansen , Alexander Viro , Dave Chinner , linux-mm , linux-fsdevel , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 17, 2014 at 11:49 AM, Kirill A. Shutemov wrote: > > But it could be safer to keep locking in place and reduce lookup cost by > exposing something like ->fault_iter_init() and ->fault_iter_next(). It > will still return one page a time, but it will keep radix-tree context > around for cheaper next-page lookup. I really would prefer for the loop to be much smaller than that, and not contain indirect calls to helpers that pretty much guarantee that you can't generate nice code. Plus I'd rather not have the mm layer know too much about the radix tree iterations anyway, and try to use the existing page array functions we already have (ie "find_get_pages()"). So I'd really prefer if we can do this with tight loops over explicit pages, rather than some loop over an iterator. Linus -- 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/