Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3757849pxk; Tue, 22 Sep 2020 01:32:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJjBaTIXTe2gPDg4WpZhk4rLS1cadRWH36tPq2flbeny3cq4o432mGh5DlRDJhzRrNExF9 X-Received: by 2002:a17:906:edd6:: with SMTP id sb22mr3437926ejb.499.1600763524135; Tue, 22 Sep 2020 01:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600763524; cv=none; d=google.com; s=arc-20160816; b=qU1XRkiruxFXezkWjinA67W1aQjcIWAfIPx74QMMRHzD4rX8VYjX4U34Xayaeh4u3P OZ9fV7diOEcPfvRoRCwZh/1+63jFJZzh80uHeXUlI7o0UfGQxxmopzJu2LH/gTQEGFX/ Wqre0Lr/ex41xuhljpJP07tgHsssIB2K6xa9LeLtGm07nrj1xubOjGmOLAhxSCdraj14 DGvBrfq6UzLsFAOH7wWwsTeppHcUZv/T02EThFYfrsf0MKFSzAbUHjnrc4nugf+06RKZ 87BWjtGkkTX5CqmFESu69PWwGZtmoPELNP/C5psUTUDJalZTNjHgQrqnFFTzY3hyZMBs G/UQ== 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:ironport-sdr :ironport-sdr; bh=HCyzSVIsuMhbggNh5D26m3k2UZRRXvb/5Bw7cdh6LCQ=; b=GKbX2Ya8iApS0qdj1ZTxZnigHDGaN25ztObB2JAdHgaqkOjIK36KNPScjlyHYuqTLF OYZzBeYI+9cp/cMdhAnb5m3EDF03S0FAMcSRxIaEqu2sKZTukLq869N2y1ITtoC5TIzT 69f+5LbapBMTZBbX7lhMV9rWXOGlpqdam20OIp0o0kioIBEqQ3aVwd8LqLI0y4u1DfGy kkHzvecs+QlSVoyBnneZLPMBYIdF+JXBBrU6CHT9ApDz4lua8t+J0sZVtx8kYz4sRYtH 3xNPjk/YrNph0dLBmLRjtrJmPNnCjgHqpa9LvItlZoXB/+Us9/a5gXU8BAYa3ni7jdlI BTRQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si10047784ejx.272.2020.09.22.01.31.41; Tue, 22 Sep 2020 01:32:04 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729700AbgIVHHc (ORCPT + 99 others); Tue, 22 Sep 2020 03:07:32 -0400 Received: from mga01.intel.com ([192.55.52.88]:5955 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729595AbgIVHHb (ORCPT ); Tue, 22 Sep 2020 03:07:31 -0400 IronPort-SDR: UkDjaQT3hrM4DVY1XfZPKhV8XstBoBC15L9dTASKf4dlNPqN7Y6swQPTxfPb1vZ/YkXDaVMJgI KdsOA+n5J79A== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="178611777" X-IronPort-AV: E=Sophos;i="5.77,289,1596524400"; d="scan'208";a="178611777" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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