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.8 required=3.0 tests=BAYES_00, 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 42D44C4363D for ; Tue, 22 Sep 2020 07:07:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 83E9523A1E for ; Tue, 22 Sep 2020 07:07:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83E9523A1E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8730E6B009E; Tue, 22 Sep 2020 03:07:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8246C6B009F; Tue, 22 Sep 2020 03:07:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 739CC6B00A0; Tue, 22 Sep 2020 03:07:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id 59FA96B009E for ; Tue, 22 Sep 2020 03:07:34 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 11E721EF1 for ; Tue, 22 Sep 2020 07:07:34 +0000 (UTC) X-FDA: 77289816828.10.knee38_2404a252714b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id ED11B16A4B0 for ; Tue, 22 Sep 2020 07:07:33 +0000 (UTC) X-HE-Tag: knee38_2404a252714b X-Filterd-Recvd-Size: 3701 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Sep 2020 07:07:33 +0000 (UTC) IronPort-SDR: 8i4+F7J7U1HODofxmHZ6VS3pFJ4GDMOZKJbaVJLfw7+gYw9tdFV8Blmkhyss0iPmHCn4ypqsRw pXAzhHHJaZYA== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="140551266" X-IronPort-AV: E=Sophos;i="5.77,289,1596524400"; d="scan'208";a="140551266" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 00:07:31 -0700 IronPort-SDR: uV+Arf2krlvG4v2YQ5M33nIRn5nCbo/BcRIYDkVVj+6ef4TxPZdbS/cNZY5ryGpuEJbavViVOw XsIKWuc972uA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,289,1596524400"; d="scan'208";a="309404721" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 22 Sep 2020 00:07:27 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 26882F2; Tue, 22 Sep 2020 10:07:26 +0300 (EEST) Date: Tue, 22 Sep 2020 10:07:26 +0300 From: "Kirill A. Shutemov" To: Vijay Balakrishna Cc: Michal Hocko , Andrew Morton , 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: <20200922070726.dlw24lf3wd3p2ias@black.fi.intel.com> References: <1600324779-6782-1-git-send-email-vijayb@linux.microsoft.com> <20200917092805.GA29887@dhcp22.suse.cz> <21c4788c-2516-2e47-5885-486c352c2b6e@linux.microsoft.com> <20200917175217.GD29887@dhcp22.suse.cz> <20200918055637.GB28827@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Sep 21, 2020 at 12:07:23PM -0700, Vijay Balakrishna wrote: > > > > I would recommend reposting the patch which adds heuristic for THP (if > > THP is enabled) into the hotplug path, arguing with the consistency and > > surprising results when adding memory decreases the value. > > I hope my reposted patch > ([v3 1/2] mm: khugepaged: recalculate min_free_kbytes after memory hotplug > as expected by khugepaged) > change log is ok: > > 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 change restores min_free_kbytes > as expected for THP consumers. Any scenario when hotremove would result in changing min_free_kbytes? > > Your initial > > problem is in sizing as mentioned in other email thread and you should > > be investigating more but this inconsistency might really come as a > > surprise. > > > > All that if Kirill is reconsidering his initial position of course. > > > > Kirill, can you comment or share your opinion? Looking again, never decreasing min_free_kbytes is the most reasonable policy. Sorry for the noise. But I would like to see a scenario when hotremov will end up changing min_free_kbytes. It's not obvious to me. -- Kirill A. Shutemov