From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3291DC43461 for ; Thu, 17 Sep 2020 09:28:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B1A96206E6 for ; Thu, 17 Sep 2020 09:28:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=suse.com header.i=@suse.com header.b="uDVPRbCT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1A96206E6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3BDA46B0055; Thu, 17 Sep 2020 05:28:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 36DA16B005A; Thu, 17 Sep 2020 05:28:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2ABBF6B005C; Thu, 17 Sep 2020 05:28:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id 162536B0055 for ; Thu, 17 Sep 2020 05:28:08 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A649C181AEF30 for ; Thu, 17 Sep 2020 09:28:07 +0000 (UTC) X-FDA: 77272027014.30.scale79_2e0a69427121 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 653F7180B3AA7 for ; Thu, 17 Sep 2020 09:28:07 +0000 (UTC) X-HE-Tag: scale79_2e0a69427121 X-Filterd-Recvd-Size: 2740 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Thu, 17 Sep 2020 09:28:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=cantorsusede; t=1600334886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FwWPfDrCUnyxcQdgYg+FPBsfaE9zUa4R5PcsOTmxFv0=; b=uDVPRbCTaT2ftWuX3z/pI91Ujj/KU81C6J+sJrjB76TgxMowwvIvDoGcOKnBh+m6WgWpVU ahcO5bV1L36LwHmXl6ORgjJSei2fFH910gSSW8nrjihGG8+r0+4dNKFklBq1SvWzoPXwKu EBl6Wu0B8WsqJ9G1q89QlgVua4fzN+yaFm54ZZSsNG0JZ2aGD9Id7hDs3BKHTjivGhwVsY AW1GBdfnPnHiodblOy5bUsTw1U6EoWtW8dqc4MuDyKjplzHknGldlaR+hXTTzMfw3dmGZt UBg0a2Y0x03WGg/A2dJslKFRp0+2aMigR1RhkarOECIPmMI13RSWU21GDvJq9g== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D2576AFEC; Thu, 17 Sep 2020 09:28:39 +0000 (UTC) Date: Thu, 17 Sep 2020 11:28:05 +0200 From: Michal Hocko To: Vijay Balakrishna Cc: Andrew Morton , "Kirill A. Shutemov" , Oleg Nesterov , Song Liu , Andrea Arcangeli , Pavel Tatashin , Allen Pais , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [v4] mm: khugepaged: avoid overriding min_free_kbytes set by user Message-ID: <20200917092805.GA29887@dhcp22.suse.cz> References: <1600324779-6782-1-git-send-email-vijayb@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1600324779-6782-1-git-send-email-vijayb@linux.microsoft.com> X-Rspamd-Queue-Id: 653F7180B3AA7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 16-09-20 23:39:39, Vijay Balakrishna wrote: > set_recommended_min_free_kbytes need to honor min_free_kbytes set by the > user. Post start-of-day THP enable or memory hotplug operations can > lose user specified min_free_kbytes, in particular when it is higher than > calculated recommended value. I was about to recommend a more detailed explanation when I have realized that this patch is not really needed after all. Unless I am missing something. init_per_zone_wmark_min ignores the newly calculated min_free_kbytes if it is lower than user_min_free_kbytes. So calculated min_free_kbytes >= user_min_free_kbytes. Except for value clamping when the value is reduced and this likely needs fixing. But set_recommended_min_free_kbytes should be fine. -- Michal Hocko SUSE Labs