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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 9255FC433DB for ; Mon, 1 Mar 2021 12:58:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0D03B64E38 for ; Mon, 1 Mar 2021 12:58:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D03B64E38 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 85A3C8D006B; Mon, 1 Mar 2021 07:58:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E4AA8D0063; Mon, 1 Mar 2021 07:58:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D30C8D006B; Mon, 1 Mar 2021 07:58:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0249.hostedemail.com [216.40.44.249]) by kanga.kvack.org (Postfix) with ESMTP id 52F988D0063 for ; Mon, 1 Mar 2021 07:58:04 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 199856131 for ; Mon, 1 Mar 2021 12:58:04 +0000 (UTC) X-FDA: 77871308088.04.6B3A12F Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf23.hostedemail.com (Postfix) with ESMTP id 2EB5FA0009D9 for ; Mon, 1 Mar 2021 12:58:03 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4C459AC24; Mon, 1 Mar 2021 12:58:02 +0000 (UTC) Date: Mon, 1 Mar 2021 13:57:59 +0100 From: Oscar Salvador To: David Hildenbrand Cc: Andrew Morton , Mike Kravetz , Muchun Song , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/2] Make alloc_contig_range handle Hugetlb pages Message-ID: <20210301125754.GA4003@linux> References: <20210222135137.25717-1-osalvador@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Stat-Signature: 978cqn1zn817fwpih456epud7cy1w5i5 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 2EB5FA0009D9 Received-SPF: none (suse.de>: No applicable sender policy available) receiver=imf23; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1614603483-630389 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, Mar 01, 2021 at 01:43:00PM +0100, David Hildenbrand wrote: > Same experiment with ZONE_MOVABLE: > > a) Free huge pages: all memory can get unplugged again. > > b) Allocated/populated but idle huge pages: all memory can get unplugged > again. > > c) Allocated/populated but all 512 huge pages are read/written in a loop: > all memory can get unplugged again, but I get a single > > [ 121.192345] alloc_contig_range: [180000, 188000) PFNs busy > > Most probably because it happened to try migrating a huge page while it was > busy. As virtio-mem retries on ZONE_MOVABLE a couple of times, it can deal > with this temporary failure. > > > > Last but not least, I did something extreme: > > ]# cat /proc/meminfo > MemTotal: 5061568 kB > MemFree: 186560 kB > MemAvailable: 354524 kB > ... > HugePages_Total: 2048 > HugePages_Free: 2048 > HugePages_Rsvd: 0 > HugePages_Surp: 0 > > > Triggering unplug would require to dissolve+alloc - which now fails when > trying to allocate an additional ~512 huge pages (1G). > > > As expected, I can properly see memory unplug not fully succeeding. + I get > a fairly continuous stream of > > [ 226.611584] alloc_contig_range: [19f400, 19f800) PFNs busy > ... > > But more importantly, the hugepage count remains stable, as configured by > the admin (me): > > HugePages_Total: 2048 > HugePages_Free: 2048 > HugePages_Rsvd: 0 > HugePages_Surp: 0 Thanks for giving it a spin David, that is highly appreciated ;-)! I will add above information in next's version changelog if you do not mind, so the before-and-after can be seen clearly. I shall send v4 in the course of the next few days. -- Oscar Salvador SUSE L3