From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753635AbbCIUwc (ORCPT ); Mon, 9 Mar 2015 16:52:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56984 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752077AbbCIUwb (ORCPT ); Mon, 9 Mar 2015 16:52:31 -0400 Message-ID: <54FE07E8.4000802@redhat.com> Date: Mon, 09 Mar 2015 16:51:52 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Eric B Munson , Andrew Morton CC: Vlastimil Babka , Thomas Gleixner , Christoph Lameter , Peter Zijlstra , Mel Gorman , David Rientjes , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3] Allow compaction of unevictable pages References: <1425934123-30591-1-git-send-email-emunson@akamai.com> In-Reply-To: <1425934123-30591-1-git-send-email-emunson@akamai.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/09/2015 04:48 PM, Eric B Munson wrote: > Currently, pages which are marked as unevictable are protected from > compaction, but not from other types of migration. The mlock > desctription does not promise that all page faults will be avoided, only > major ones so this protection is not necessary. This extra protection > can cause problems for applications that are using mlock to avoid > swapping pages out, but require order > 0 allocations to continue to > succeed in a fragmented environment. This patch removes the > ISOLATE_UNEVICTABLE mode and the check for it in __isolate_lru_page(). > Removing this check allows the removal of the isolate_mode argument from > isolate_migratepages_block() because it can compute the required mode > from the compact_control structure. > > To illustrate this problem I wrote a quick test program that mmaps a > large number of 1MB files filled with random data. These maps are > created locked and read only. Then every other mmap is unmapped and I > attempt to allocate huge pages to the static huge page pool. Without > this patch I am unable to allocate any huge pages after fragmenting > memory. With it, I can allocate almost all the space freed by unmapping > as huge pages. > > Signed-off-by: Eric B Munson > Acked-by: David Rientjes > Cc: Vlastimil Babka > Cc: Thomas Gleixner > Cc: Christoph Lameter > Cc: Peter Zijlstra > Cc: Mel Gorman > Cc: David Rientjes > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org Acked-by: Rik van Riel