All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Document interaction between compaction and the unevictable LRU
@ 2015-03-30 18:31 Eric B Munson
  2015-03-30 22:09 ` Andrew Morton
  2015-04-04  9:45 ` Jonathan Corbet
  0 siblings, 2 replies; 4+ messages in thread
From: Eric B Munson @ 2015-03-30 18:31 UTC (permalink / raw)
  To: Jonathan Corbet, akpm; +Cc: Eric B Munson, linux-doc, linux-kernel

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.

Signed-off-by: Eric B Munson <emunson@akamai.com>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 Documentation/vm/unevictable-lru.txt |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt
index 744f82f..b72246e 100644
--- a/Documentation/vm/unevictable-lru.txt
+++ b/Documentation/vm/unevictable-lru.txt
@@ -22,6 +22,7 @@ CONTENTS
      - Filtering special vmas.
      - munlock()/munlockall() system call handling.
      - Migrating mlocked pages.
+     - Compacting mlocked pages.
      - mmap(MAP_LOCKED) system call handling.
      - munmap()/exit()/exec() system call handling.
      - try_to_unmap().
@@ -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.
+
+
 mmap(MAP_LOCKED) SYSTEM CALL HANDLING
 -------------------------------------
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Document interaction between compaction and the unevictable LRU
  2015-03-30 18:31 [PATCH] Document interaction between compaction and the unevictable LRU Eric B Munson
@ 2015-03-30 22:09 ` Andrew Morton
  2015-03-31 13:23   ` Eric B Munson
  2015-04-04  9:45 ` Jonathan Corbet
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2015-03-30 22:09 UTC (permalink / raw)
  To: Eric B Munson; +Cc: Jonathan Corbet, linux-doc, linux-kernel

On Mon, 30 Mar 2015 14:31:14 -0400 Eric B Munson <emunson@akamai.com> 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
_


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Document interaction between compaction and the unevictable LRU
  2015-03-30 22:09 ` Andrew Morton
@ 2015-03-31 13:23   ` Eric B Munson
  0 siblings, 0 replies; 4+ messages in thread
From: Eric B Munson @ 2015-03-31 13:23 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Jonathan Corbet, linux-doc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2386 bytes --]

On Mon, 30 Mar 2015, Andrew Morton wrote:

> On Mon, 30 Mar 2015 14:31:14 -0400 Eric B Munson <emunson@akamai.com> 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
> _
> 

That looks good, thanks.

Eric

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Document interaction between compaction and the unevictable LRU
  2015-03-30 18:31 [PATCH] Document interaction between compaction and the unevictable LRU Eric B Munson
  2015-03-30 22:09 ` Andrew Morton
@ 2015-04-04  9:45 ` Jonathan Corbet
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2015-04-04  9:45 UTC (permalink / raw)
  To: Eric B Munson; +Cc: akpm, linux-doc, linux-kernel

On Mon, 30 Mar 2015 14:31:14 -0400
Eric B Munson <emunson@akamai.com> 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.

Applied (with Andrew's name-the-sysctl tweak) to the docs tree.

Thanks,

jon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-04  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 18:31 [PATCH] Document interaction between compaction and the unevictable LRU Eric B Munson
2015-03-30 22:09 ` Andrew Morton
2015-03-31 13:23   ` Eric B Munson
2015-04-04  9:45 ` Jonathan Corbet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.