From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753503AbbC3WJq (ORCPT ); Mon, 30 Mar 2015 18:09:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56499 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752290AbbC3WJk (ORCPT ); Mon, 30 Mar 2015 18:09:40 -0400 Date: Mon, 30 Mar 2015 15:09:39 -0700 From: Andrew Morton To: Eric B Munson Cc: Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Document interaction between compaction and the unevictable LRU Message-Id: <20150330150939.2e0bd53a3a16ada4cce8ec05@linux-foundation.org> In-Reply-To: <1427740274-2926-1-git-send-email-emunson@akamai.com> References: <1427740274-2926-1-git-send-email-emunson@akamai.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 Mar 2015 14:31:14 -0400 Eric B Munson wrote: > The memory compaction code uses the migration code to do most of the > work in compaction. However, the compaction code interacts with the > unevictable LRU differently than migration code and this difference > should be noted in the documentation. > > --- a/Documentation/vm/unevictable-lru.txt > +++ b/Documentation/vm/unevictable-lru.txt > @@ -450,6 +451,16 @@ list because of a race between munlock and migration, page migration uses the > putback_lru_page() function to add migrated pages back to the LRU. > > > +COMPACTING MLOCKED PAGES > +------------------------ > + > +The unevictable LRU can be scanned for compactable regions and the default > +behavior is to do so. There is a sysctl to control this behavior (see > +Documentation/sysctl/vm.txt). Once scanning of the unevictable LRU is > +enabled, the work of compaction is mostly handled by the page migration code > +and the same work flow as described in MIGRATING MLOCKED PAGES will apply. > + Thanks. Let's tell people what this sysctl is called? s@There is a sysctl to control@/proc/sys/vm/compact_unevictable_allowed controls@: --- a/Documentation/vm/unevictable-lru.txt~document-interaction-between-compaction-and-the-unevictable-lru-fix +++ a/Documentation/vm/unevictable-lru.txt @@ -455,10 +455,11 @@ COMPACTING MLOCKED PAGES ------------------------ The unevictable LRU can be scanned for compactable regions and the default -behavior is to do so. There is a sysctl to control this behavior (see -Documentation/sysctl/vm.txt). Once scanning of the unevictable LRU is -enabled, the work of compaction is mostly handled by the page migration code -and the same work flow as described in MIGRATING MLOCKED PAGES will apply. +behavior is to do so. /proc/sys/vm/compact_unevictable_allowed controls +this behavior (see Documentation/sysctl/vm.txt). Once scanning of the +unevictable LRU is enabled, the work of compaction is mostly handled by +the page migration code and the same work flow as described in MIGRATING +MLOCKED PAGES will apply. mmap(MAP_LOCKED) SYSTEM CALL HANDLING _