[lkml]   [2020]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [[PATCH]] mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged

On 9/10/2020 3:28 PM, Pavel Tatashin wrote:
> Hi Kirill,
> On Thu, Sep 10, 2020 at 6:01 PM Kirill A. Shutemov
> <> wrote:
>> On Thu, Sep 10, 2020 at 01:47:39PM -0700, Vijay Balakrishna wrote:
>>> When memory is hotplug added or removed the min_free_kbytes must be
>>> recalculated based on what is expected by khugepaged. Currently
>>> after hotplug, min_free_kbytes will be set to a lower default and higher
>>> default set when THP enabled is lost. This leaves the system with small
>>> min_free_kbytes which isn't suitable for systems especially with network
>>> intensive loads. Typical failure symptoms include HW WATCHDOG reset,
>>> soft lockup hang notices, NETDEVICE WATCHDOG timeouts, and OOM process
>>> kills.
>>> Fixes: f000565adb77 ("thp: set recommended min free kbytes")
>>> Signed-off-by: Vijay Balakrishna <>
>>> Cc:
>> NAK. It would override min_free_kbytes set by user.
> Hi Kirill,
> Thank you for looking into this. How is this different from when
> khugepaged modifies it?
> echo always >/sys/kernel/mm/transparent_hugepage/enabled
> Which results in:
> start_stop_khugepaged
> set_recommended_min_free_kbytes
> Which will also adjust min_free_kbytes according to hugepaged requirement?
> This bug that Vijay described is another hot-plug related issue that
> we have found on our system where we perform memory hot add and hot
> remove on every reboot.
> Thank you,
> Pasha

Thanks Kirill for taking a look and spotting it.

IIUC, it is an existing issue, we should fix it while we are at it.
Otherwise with my propsed patch introduces a regression for hotplug
memory consumers with THP enabled and min_free_kbytes set by user higher
than calculated by THP.


 \ /
  Last update: 2020-09-11 00:57    [W:0.064 / U:2.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site