Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1432445pxk; Thu, 10 Sep 2020 15:31:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykn0zv734wWCBPOa34ASyInx4RJycw9TGlQIfOZnsLQyzj+gpX0dUgmKkKRKA1buNKl/aN X-Received: by 2002:a50:8d57:: with SMTP id t23mr11954135edt.308.1599777092060; Thu, 10 Sep 2020 15:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599777092; cv=none; d=google.com; s=arc-20160816; b=CyB8Sq4RIE3422nYHEC8RbBbsL+SRSAK7qOjmg3JpgvHZjtDjo/mJ44//9Y5aQNbyh kVBSNCVq3UuvVt49Tt9K7Dqic07tjGjDMB8jKiOTmAOmtykw+fuu399e8phrIySeEZvK M+XnW4EjFSVZyN0XlYwIpR2KsnxdS9t55ZPTF5Hwkv4kuUCzvIMIPdir+nNxmXoCsugr o7mO0d4iknKVDL1v/wTBs5/6Wzp+TfMQ+G1dZBasNf2zSq9TXUqRj3hi92MKN5vDJKQJ vVC5i/14D4sYeSwBpLSYmfMSJhmAkEEPb1gvnPKRcmk+vdpNtktoFtpaU17eyScvzRO1 K4ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RemceQYpfwTMZI7GvmZz01XxDX57S6jy8i4dk7JJMAA=; b=IswWjKZZc8hrFzSZgJCXNZ0R1WXn5vpePS0sbHfjA3lmzlxWncRtGuOpzjHK9sMIbp P2RnRV0lvaTOXuVNNxZOxGMljKFrUwQRUA4L/Hq7p8CaPb/poaoDmg2Ip4lLGIvmH6wZ vrSTJvW5umBYkhdfxZ+bN/D1b94NUcI+0lH74W8uG9KItrKjUlYOGzZeBhzl/m0gZ+Zp 6WjPMl0x4GBIgbFBqUDf6gua6XWSY1jprjKSn9Hd3iy0PNhH7jJXaCr6RobU2G6KSrYK iTYG2yu7vXPeEJ6aDj8e0cduNORlcDMQ0Yon1LBz9d78epI5icEbbNEn0q0obpn54cGi xw1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=anjWYdkL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si3028ejs.146.2020.09.10.15.31.08; Thu, 10 Sep 2020 15:31:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=anjWYdkL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725822AbgIJW3K (ORCPT + 99 others); Thu, 10 Sep 2020 18:29:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725355AbgIJW3H (ORCPT ); Thu, 10 Sep 2020 18:29:07 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B0ACC061573 for ; Thu, 10 Sep 2020 15:29:07 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id q21so8017041edv.1 for ; Thu, 10 Sep 2020 15:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RemceQYpfwTMZI7GvmZz01XxDX57S6jy8i4dk7JJMAA=; b=anjWYdkLN4gIBWfzcuYV32XXsJNNWFlJieTFfjQBtCxv7TQFjfdJIYWsKDwJv67SJt X3lRg3LAFe3yemCNMT3YNeSLRgw9zEjXIH6bER9PF3Y6qiUSYAx52hv82P/TWh+y59Xy /xcdM7RHlcTX1Em272Zhy/29KdOtrFqkATOH6IUIBShC0a2Ix2R4+glwUOTbMh5/n4VQ V6j9rcO961M8qh6Q/5MeOjV0cnZl78WXT+SfWk/5rBmUJZmzR7iB4hP9O29636iNsO7k +N99UIYyS2wwaNbrUwZ047GZ1Tku8kpFLfNbown9eZV2HEX5SA7NyvtWfsI7BRXWNmVb Ux0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RemceQYpfwTMZI7GvmZz01XxDX57S6jy8i4dk7JJMAA=; b=nbNHRkTsKQTyg24+EfYazBV/NMibaQITW7IheIJqElLOYe+xLeespmwg4Nq4CsQdqM /A/xzAPb0iyeTtqxjKrYdw0OvY0edVykK/nFtwk4wG+ASFzfMNE3/CQkwVZvmQOiqLwV WB2pPVgtI9U818o3kdnoYIVaJb66hcofSL/bRRCTNepUR1Iz4XpAW3Qfy8c2AjV4VTAc UmLED+JVz0QxGZ0ybaiBx2yyqUzhfXA44JLbh/iGbDSv/sEqZhLJVyjKJCEkyQ+Rn/bR JIIoLzZikG1kxUwpuj90f6tKD72lgqv1poSOTq1Uv1ZqDw77Lq0nMDj8t1Vox/iUNOoK Gblg== X-Gm-Message-State: AOAM530fb7aVp1s8SCHpZw2Kt9ztsRp1fM8SVUEpdLBr7kyuwWntOzHY c5jQOSv4pqWA0ahY2gUibttgrd4e9QpLktDtp2+rcA== X-Received: by 2002:a05:6402:1544:: with SMTP id p4mr11588205edx.346.1599776945630; Thu, 10 Sep 2020 15:29:05 -0700 (PDT) MIME-Version: 1.0 References: <1599770859-14826-1-git-send-email-vijayb@linux.microsoft.com> <20200910220145.5j7iogqulmvg5vr6@black.fi.intel.com> In-Reply-To: <20200910220145.5j7iogqulmvg5vr6@black.fi.intel.com> From: Pavel Tatashin Date: Thu, 10 Sep 2020 18:28:29 -0400 Message-ID: Subject: Re: [[PATCH]] mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged To: "Kirill A. Shutemov" Cc: Vijay Balakrishna , Andrew Morton , Oleg Nesterov , Song Liu , Andrea Arcangeli , Allen Pais , LKML , linux-mm Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: stable@vger.kernel.org > > 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