On Wed, Sep 16, 2020 at 3:33 AM Michal Hocko <mhocko@xxxxxxxx> wrote: > > On Tue 15-09-20 17:09:48, Andrew Morton wrote: > > From: Vijay Balakrishna <vijayb@xxxxxxxxxxxxxxxxxxx> > > Subject: mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged > > > > 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. > > > > Link: https://lkml.kernel.org/r/1600204258-13683-1-git-send-email-vijayb@xxxxxxxxxxxxxxxxxxx > > Fixes: f000565adb77 ("thp: set recommended min free kbytes") > > Signed-off-by: Vijay Balakrishna <vijayb@xxxxxxxxxxxxxxxxxxx> > > Reviewed-by: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx> > > Cc: Allen Pais <apais@xxxxxxxxxxxxx> > > Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> > > Cc: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> > > Cc: Michal Hocko <mhocko@xxxxxxxx> > > Cc: Oleg Nesterov <oleg@xxxxxxxxxx> > > Cc: Song Liu <songliubraving@xxxxxx> > > Cc: <stable@xxxxxxxxxxxxxxx> > > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> > > The patch has been explicitly nacked by Kirill IIRC. Hi Michal, You are correct it was NAK by Kirill because of this: "NAK. It would override min_free_kbytes set by user." I do not see a problem with that because during boot we are doing exactly that: if the user sets unreasonably small min_free_kbytes we overwrite it and print a message about it. Kirill could you please comment on this? IMO the hot-add behaviour must be exactly the same as during boot. I am also not happy > about it because the changelog doesn't really explain the problem and > the follow up discussion didn't drill down to the underlying problem > either. > > Maybe we want to make the min_free_kbytes udpate consistent with the > boot but the current changelog is incomplete and this shouldn't have > been added yet. > Yes, what Vijay should do is to remove all the irrelevant information from the commit log, and only state the actual problem that he found which is min_free_kbytes is not being updated during the memory hotplug. I think the OOMs and timeouts should be covered in a different discussion. Thank you, Pasha