Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp950225pxk; Thu, 17 Sep 2020 22:47:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFURO8t3s0Ig/A2oQf9QgVH88/8omyNvI6txsVn36FcSuGZcKLbTPiIX5FYvL4dYxLJ/gv X-Received: by 2002:aa7:dd4b:: with SMTP id o11mr35946882edw.251.1600408076574; Thu, 17 Sep 2020 22:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600408076; cv=none; d=google.com; s=arc-20160816; b=THLlp+obSOxbGVJmb3l2XOmeJ3GTqm0BLzI8qmHqC43gvgKESdaeslfdrA566ro8VK C+sEqIL/m5/jTAIj2Iqk0KY+c/bVOtI3MmiBt6cxhXMPcIVykftbKDZqMtaC+aceIdoP NX7FD7lAxAt9C8Hqjipj+c8xD4tcOvL/+M76dH0u/1EVAjX8YdrTLifZgW4yL4357JVD Z1GwVNgexyrYo4sVN3aCpdSXm9D5bSADwT0Eh6Q1U0XDLaxRpn0ZiHXF0E9ZqgbEukAv tZR9wSQ6rZ+if/rw0CB8CCAEjM9w0J4oFeot0StFszWeFrURxbE1RNZLfT0Z0xlBJ5we LKBw== 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=qtgJb5DOSfFArBP5h7rhRhAb+SSCe85VA5Xwta08aZQ=; b=ltx6RSaWbWbxDeVDWJWIVEwYyfO9SVy6F/kvjQxncRJ0digap7Gy6Bm2YUj5OJEXnR OYxysnXu1CXmgF3O7yrRp9FtXV60VR0a/BO6trVHn23dowEmfYBqn7OiUWWlRNNwbZNx ppHjLC3UvaLmYmgKarRjhL2k/FyicMK/lTUg1sxsSJvYXOKl9Zl05rk54mAiEk45g9+j Go5ux49X/AUQCO7+vyffDcSniFbZSVWrTegVSp3bphaBqI3NBFCjZb4TvOQVtRiuEZpd tVQPDxxde8INKXWClknHyIWw0tXe2RNPQzkhmzDu9e1uLC9vOphuAdLjy7+yz5DH4qdd GSCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@suse.com header.s=cantorsusede header.b=NjiVvGH3; 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 z14si1473572eja.502.2020.09.17.22.47.33; Thu, 17 Sep 2020 22:47:56 -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=NjiVvGH3; 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 S1726546AbgIRFpR (ORCPT + 99 others); Fri, 18 Sep 2020 01:45:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:34978 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbgIRFpQ (ORCPT ); Fri, 18 Sep 2020 01:45:16 -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=1600407914; 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=qtgJb5DOSfFArBP5h7rhRhAb+SSCe85VA5Xwta08aZQ=; b=NjiVvGH3nPC2P7dzYLPH7KdE+uECzWnMRkusn29gMNtXOUdrIzIjuFuhr+VXVGnrioQB9N xQX0A05P1ofLUXUiFsi+L9bZAiJ6jRkC7HxLkdFDAsXaE/ZYV1mm3/ddWLpqNtdy2G/CQM ldO1YaQFqQ9C4KByXaMxtdSn81p9rfimUmV5mLYDbNdHbTjo891ynzBhXJBeADavs4FWVy zBcNmAzQ2qSAaAIPrheNL6qUIiIo5JOVLcAnKQo6wNwUry9YzBUWoGnqM/cJAfkoFVlmfJ o/18zEwnZ70LUDjeRgOS/EPu0Kaov1dcKHdjojBP7NhHzPeBzxDLrgXshaI0PQ== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D042AACC8; Fri, 18 Sep 2020 05:45:48 +0000 (UTC) Date: Fri, 18 Sep 2020 07:45:13 +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: [[PATCH]] mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged Message-ID: <20200918054513.GA28827@dhcp22.suse.cz> References: <1599770859-14826-1-git-send-email-vijayb@linux.microsoft.com> <20200914143312.GU16999@dhcp22.suse.cz> <20200915081832.GA4649@dhcp22.suse.cz> <53dd1e2c-f07e-ee5b-51a1-0ef8adb53926@linux.microsoft.com> <20200916065306.GB18998@dhcp22.suse.cz> <32b73685-48f2-b6dd-f000-8ea52cfee70a@linux.microsoft.com> <20200917121213.GC29887@dhcp22.suse.cz> <7eddcc58-f65f-0be9-60e8-2de013365909@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7eddcc58-f65f-0be9-60e8-2de013365909@linux.microsoft.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 17-09-20 11:03:56, Vijay Balakrishna wrote: [...] > > > The auto tuned value is incorrect post hotplug memory operation, in our use > > > case memoy hot add occurs very early during boot. > > Define incorrect. What are the actual values? Have you tried to increase > > the value manually after the hotplug? > > In our case SoC with 8GB memory, system tuned min_free_kbytes > - first to 22528 > - we perform memory hot add very early in boot What was the original and after-the-hotplug size of memory and layout? I suspect that all the hotplugged memory is in Movable zone, right? > - now min_free_kbytes is 8703 > > Before looking at code, first I manually restored min_free_kbytes soon after > boot, reran stress and didn't notice symptoms I mentioned in change log. This is really surprising and I strongly suspect that an earlier reclaim just changed the timing enough so that workload has spread the memory prpessure over a longer time and that might have been enough to recycle some of the unreclaimable memory due to its natural life time. But this is a pure speculation. Much more data would be needed to analyze this. In any case your stress test is oveprovisioning your Normal zone and increased min_free_kbytes just papers over the sizing problem. -- Michal Hocko SUSE Labs