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=-14.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL 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 C8F8CC43465 for ; Fri, 18 Sep 2020 15:32:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 50DDB21582 for ; Fri, 18 Sep 2020 15:32:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="n5Ji1nTa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50DDB21582 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A985F6B0037; Fri, 18 Sep 2020 11:32:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9F970900002; Fri, 18 Sep 2020 11:32:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C0176B005C; Fri, 18 Sep 2020 11:32:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 73C7B6B0037 for ; Fri, 18 Sep 2020 11:32:16 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2C52C2C84 for ; Fri, 18 Sep 2020 15:32:16 +0000 (UTC) X-FDA: 77276573472.21.kitty63_1400e682712c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id E9C89180442C4 for ; Fri, 18 Sep 2020 15:32:15 +0000 (UTC) X-HE-Tag: kitty63_1400e682712c X-Filterd-Recvd-Size: 4037 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Sep 2020 15:32:15 +0000 (UTC) Received: from [192.168.0.121] (unknown [209.134.121.133]) by linux.microsoft.com (Postfix) with ESMTPSA id DBFD720B7178; Fri, 18 Sep 2020 08:32:13 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DBFD720B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1600443134; bh=vtTb3EJ7mTrVHVijtfqLvW2pXnRFIW6KVA1gLHyzNYc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=n5Ji1nTaHer+8uHNqErs+DOOYFNYUBJV18go1fqVzWVf69ZPpRkVWFtRsJy6xrlZy ln5lhexvwwpgC24hQZSXMv2vzpskJnsdPl818ESSc3A1Y3W4Sa7WdL1+545pj9ifGe DIy+FX+NcHYqAXRPwiahqSDl8Ss72GjenuNoqfoc= Subject: Re: [[PATCH]] mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged To: Michal Hocko 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 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> <20200918054513.GA28827@dhcp22.suse.cz> From: Vijay Balakrishna Message-ID: <2bd9ebf5-f6b7-1a2a-be61-9d4af8210cce@linux.microsoft.com> Date: Fri, 18 Sep 2020 08:32:13 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200918054513.GA28827@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit 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 9/17/2020 10:45 PM, Michal Hocko wrote: > 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? Yes, added ~1.92GB as Movable type, booting with 6GB at start. > >> - 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. > It is a synthetic workload, likely not sized I need to check. I feel having higher min_free_kbytes made GFP_ATOMIC allocations not to fail. I have seen NETDEV WATCHDOG timeout with stacktrace trying to allocate memory, looping in net rx receive path. Thanks, Vijay