From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752073AbaE0Qnv (ORCPT ); Tue, 27 May 2014 12:43:51 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:46220 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751726AbaE0Qnu (ORCPT ); Tue, 27 May 2014 12:43:50 -0400 Date: Tue, 27 May 2014 18:43:41 +0200 From: Peter Zijlstra To: Christoph Lameter Cc: Konstantin Khlebnikov , "linux-mm@kvack.org" , Linux Kernel Mailing List , Thomas Gleixner , Andrew Morton , Hugh Dickins , Mel Gorman , Roland Dreier , Sean Hefty , Hal Rosenstock , Mike Marciniszyn Subject: Re: [RFC][PATCH 0/5] VM_PINNED Message-ID: <20140527164341.GD11074@laptop.programming.kicks-ass.net> References: <20140526145605.016140154@infradead.org> <20140526203232.GC5444@laptop.programming.kicks-ass.net> <20140527102909.GO30445@twins.programming.kicks-ass.net> <20140527144655.GC19143@laptop.programming.kicks-ass.net> <20140527153143.GD19143@laptop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 27, 2014 at 11:31:21AM -0500, Christoph Lameter wrote: > On Tue, 27 May 2014, Peter Zijlstra wrote: > > > On Tue, May 27, 2014 at 10:14:10AM -0500, Christoph Lameter wrote: > > > On Tue, 27 May 2014, Peter Zijlstra wrote: > > > > > > > Well, like with IB, they start out as normal userspace pages, and will > > > > be from ZONE_MOVABLE. > > > > > > Well we could change that now I think. If the VMA has VM_PINNED set > > > pages then do not allocate from ZONE_MOVABLE. > > > > But most allocations sites don't have the vma. We allocate page-cache > > pages based on its address_space/mapping, not on whatever vma they're > > mapped into. > > Most allocations by the application for an address range also must > consider a memory allocation policy which is also bound to a vma and we > have code for that in mm/mempolicy.c > > Code could be easily added to alloc_pages_vma() to consider the pinned > status on allocation. Remove GFP_MOVABLE if the vma is pinned. Yes, but alloc_pages_vma() isn't used for shared pages (with exception of shmem and hugetlbfs). So whichever way around we have to do the mm_populate() + eviction hook + migration code, and since that equally covers the anon case, why bother?