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.5 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 C21F7C43463 for ; Fri, 18 Sep 2020 05:45:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 347BF2083B for ; Fri, 18 Sep 2020 05:45:18 +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="NjiVvGH3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 347BF2083B 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 4B2826B0003; Fri, 18 Sep 2020 01:45:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 463366B0055; Fri, 18 Sep 2020 01:45:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3A10C6B005A; Fri, 18 Sep 2020 01:45:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0066.hostedemail.com [216.40.44.66]) by kanga.kvack.org (Postfix) with ESMTP id 247416B0003 for ; Fri, 18 Sep 2020 01:45:17 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C659C180AD820 for ; Fri, 18 Sep 2020 05:45:16 +0000 (UTC) X-FDA: 77275094232.23.nest99_070ee7927128 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 9966937604 for ; Fri, 18 Sep 2020 05:45:16 +0000 (UTC) X-HE-Tag: nest99_070ee7927128 X-Filterd-Recvd-Size: 3707 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Sep 2020 05:45:16 +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=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> 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 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