Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1379284

Re: [PATCH 1/1] mm: update min_free_kbytes from khugepaged after core initialization

From David Rientjes <rientjes@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] mm: update min_free_kbytes from khugepaged after core initialization
Date 2016-04-14 22:10 +0200
Message-ID <rnVKp-7KX-7@gated-at.bofh.it> (permalink)
References <rncDD-4nO-1@gated-at.bofh.it> <rncDD-4nO-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 12 Apr 2016, Jason Baron wrote:

> Khugepaged attempts to raise min_free_kbytes if its set too low. However,
> on boot khugepaged sets min_free_kbytes first from subsys_initcall(), and
> then the mm 'core' over-rides min_free_kbytes after from
> init_per_zone_wmark_min(), via a module_init() call.
> 
> Khugepaged used to use a late_initcall() to set min_free_kbytes (such that
> it occurred after the core initialization), however this was removed when
> the initialization of min_free_kbytes was integrated into the starting of
> the khugepaged thread.
> 
> The fix here is simply to invoke the core initialization using a
> core_initcall() instead of module_init(), such that the previous
> initialization ordering is restored. I didn't restore the late_initcall()
> since start_stop_khugepaged() already sets min_free_kbytes via
> set_recommended_min_free_kbytes().
> 
> This was noticed when we had a number of page allocation failures when
> moving a workload to a kernel with this new initialization ordering. On an
> 8GB system this restores min_free_kbytes back to 67584 from 11365 when
> CONFIG_TRANSPARENT_HUGEPAGE=y is set and either
> CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y or
> CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y.
> 
> Fixes: 79553da293d3 ("thp: cleanup khugepaged startup")
> Signed-off-by: Jason Baron <jbaron@akamai.com>

Acked-by: David Rientjes <rientjes@google.com>

I assume it could also be fixed by not setting min_free_kbytes lower in 
init_per_zone_wmark_min(), but if the ordering is correct this is less 
code.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/1] mm: setting of min_free_kbytes Jason Baron <jbaron@akamai.com> - 2016-04-12 22:00 +0200
  [PATCH 1/1] mm: update min_free_kbytes from khugepaged after core initialization Jason Baron <jbaron@akamai.com> - 2016-04-12 22:00 +0200
    Re: [PATCH 1/1] mm: update min_free_kbytes from khugepaged after  core initialization "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-04-13 12:40 +0200
    Re: [PATCH 1/1] mm: update min_free_kbytes from khugepaged after  core initialization David Rientjes <rientjes@google.com> - 2016-04-14 22:10 +0200

csiph-web