[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200206203945.GZ8731@bombadil.infradead.org>
Date: Thu, 6 Feb 2020 12:39:45 -0800
From: Matthew Wilcox <willy@...radead.org>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: David Rientjes <rientjes@...gle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Song Liu <songliubraving@...com>,
"Kirill A.Shutemov" <kirill.shutemov@...ux.intel.com>,
Mel Gorman <mgorman@...hsingularity.net>,
Vlastimil Babka <vbabka@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm: always consider THP when adjusting min_free_kbytes
On Wed, Feb 05, 2020 at 05:36:44PM -0800, Mike Kravetz wrote:
> The value of min_free_kbytes is calculated in two routines:
> 1) init_per_zone_wmark_min based on available memory
> 2) set_recommended_min_free_kbytes may reserve extra space for
> THP allocations
>
> In both of these routines, a user defined min_free_kbytes value will
> be overwritten if the value calculated in the code is larger. No message
> is logged if the user value is overwritten.
>
> Change code to never overwrite user defined value. However, do log a
> message (once per value) showing the value calculated in code.
But what if the user set min_free_kbytes to, say, half of system memory,
and then hot-unplugs three quarters of their memory? I think the kernel
should protect itself against such foolishness.
Powered by blists - more mailing lists