Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp274832pxk; Thu, 17 Sep 2020 02:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzffA2LtlTfpyiq9iW4PiyM63kgaDx1R3SGielLhP6efjVUyqin/IuiX7yDCmOr6KPhpO4a X-Received: by 2002:a17:906:1945:: with SMTP id b5mr13765951eje.102.1600335932131; Thu, 17 Sep 2020 02:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600335932; cv=none; d=google.com; s=arc-20160816; b=PRybkGoxsyHamvR4dCYWIHZr3ZXRkdKTY6nyM5rRl7fGqVvmh5ZS37/YvK7sv6+j1U 6RKSb8yPimKtOO34iiLpkBojckE10BRhMQ3Dkh2CtH3fKLqXAcGaZt21xZVUeKJqSNG9 NzFKshJTSX5/MNAVf4eUJs5R9JLv5qVqOlSYd6IK07ZY7veNL6ArDponNYeMyPe7X6fQ Y4xnX6k/Xc02tL6YzMKvRcVpdoqttOGnldCyGney4OX1p3jsd1/QVwgSwo6XVn9cxJDt Pssje4OBygFhjvqMPwF1hvkJr5C7J3B9BKASF5Yk7hOOmt4cqkNsNGuvndf/Rx2yTQ/L NAlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FwWPfDrCUnyxcQdgYg+FPBsfaE9zUa4R5PcsOTmxFv0=; b=bkiVtrFfxx3wqIAwwgeo15wTs4Am4TEdp4YKGqBZKMPJ4ZgYdWwfaTxfuJsHZaALSc aNDT5Y9y2AvzX6Uxr6cFeSTIDIMRXEuwgsCXVb/mx0JGfdShoPPkr268GDJk/I7AQEfc YcEa6yGVey/In/G5jxKbElfqM7geIUUPRh+4etm+m5RLfRWAiKmgXOUVznxqZZUHfNNn IBFCRpfgTJCmTMdzBegYu1sjulE2QIHGBsrxP8bKRBk9XjEPkHwWIbCRzIdgCiiufos6 UwgOFSkcS25M5YJ4LRStmcSTFTMQTXa1/hEFZDiTJzuCE2cXsIYkkRe1MlitBl9A0yv2 5WCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@suse.com header.s=cantorsusede header.b=uDVPRbCT; 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 l17si13495597ejc.226.2020.09.17.02.45.09; Thu, 17 Sep 2020 02:45: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=temperror (no key for signature) header.i=@suse.com header.s=cantorsusede header.b=uDVPRbCT; 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 S1726453AbgIQJnr (ORCPT + 99 others); Thu, 17 Sep 2020 05:43:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:51076 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbgIQJno (ORCPT ); Thu, 17 Sep 2020 05:43:44 -0400 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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