Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp600626pxk; Wed, 16 Sep 2020 11:53:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuUmWiZDyZx9W/MU+ECplJWrIvhvjjjMDXDEr0TjTGXezzIQfAO0/lZB4N1iQ1X7fMGSeO X-Received: by 2002:a17:906:11d2:: with SMTP id o18mr26312325eja.420.1600282437503; Wed, 16 Sep 2020 11:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600282437; cv=none; d=google.com; s=arc-20160816; b=MF1EfrbexJGnLifaocBwvV92qR87RQCpgkmElDDNX7OSKF52WtkW4P2Dt0eAXNAhif yPAk3aw42LhakJ+ZMzleaBJHOHtJBzUlAcwvHZf4l0DoW0/+c8jCLxVrOQp2+N2Sgb24 kzQgorw0geJ5kHDoXkaAzFHKGyxi3IPiZdXgjw9c1xXQlQVZGAaG2klh7f4DL8sXnvBk wqEZtMwioVkX9NMEEguqlzeIhuVcN3oI7yIciX+bawAtq/WWnHQ6RDM4rVRG4CKGsatQ +HoYhDw1GrL4RCu7EG+zQvMkiF1us/G2laNm6Mqq+Khne6tVFAgAnzGkreSMpipchSbO +Aug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version; bh=gkjperU+YlK6ps9EW9SkGvsceL4mGytCMoR5BhFG5d8=; b=g+CHPb5TkeukzXhbCmH8NMEOmudcscyRmjBu9uxOLY9a8r304O57Bi9smCU06mO1aq lc7iLyB6cz82aBwU9iz9JQM/m7ekiNX1z43WfgOgfAoMQmJra9VUzPcdAq6dyfcn/hkS TK3+LevrbqX1LDNtN1u1V9KFnKpTrCiaE1F3tWayLoO6f+WCSmgLYsOMm7J31EXO5f8e MB3ts+IjLkkAAQtKdqI1Tz3OJcXYoCnZ/oQ5ONDdZDYLxGIMZx/kMLgA7ngMa8pD77j8 coIXZdjKnnZPaGJ9EHDlrPiAEfQa0SVE4mzmZtnEr4WBvBmqD13IduuwW3SRTrBXtW9Y 4FhQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz6si13462655edb.142.2020.09.16.11.53.35; Wed, 16 Sep 2020 11:53:57 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728040AbgIPSvC (ORCPT + 99 others); Wed, 16 Sep 2020 14:51:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:50312 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727499AbgIPSup (ORCPT ); Wed, 16 Sep 2020 14:50:45 -0400 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 A4D40AF6D; Wed, 16 Sep 2020 18:50:58 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 16 Sep 2020 20:50:41 +0200 From: osalvador@suse.de To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-hyperv@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Andrew Morton , Alexander Duyck , Dave Hansen , Haiyang Zhang , "K. Y. Srinivasan" , Mel Gorman , Michael Ellerman , Michal Hocko , Mike Rapoport , Scott Cheloha , Stephen Hemminger , Vlastimil Babka , Wei Liu , Wei Yang Subject: Re: [PATCH RFC 0/4] mm: place pages to the freelist tail when onling and undoing isolation In-Reply-To: <20200916183411.64756-1-david@redhat.com> References: <20200916183411.64756-1-david@redhat.com> User-Agent: Roundcube Webmail Message-ID: <5c0910c2cd0d9d351e509392a45552fb@suse.de> X-Sender: osalvador@suse.de Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-16 20:34, David Hildenbrand wrote: > When adding separate memory blocks via add_memory*() and onlining them > immediately, the metadata (especially the memmap) of the next block > will be > placed onto one of the just added+onlined block. This creates a chain > of unmovable allocations: If the last memory block cannot get > offlined+removed() so will all dependant ones. We directly have > unmovable > allocations all over the place. > > This can be observed quite easily using virtio-mem, however, it can > also > be observed when using DIMMs. The freshly onlined pages will usually be > placed to the head of the freelists, meaning they will be allocated > next, > turning the just-added memory usually immediately un-removable. The > fresh pages are cold, prefering to allocate others (that might be hot) > also feels to be the natural thing to do. > > It also applies to the hyper-v balloon xen-balloon, and ppc64 dlpar: > when > adding separate, successive memory blocks, each memory block will have > unmovable allocations on them - for example gigantic pages will fail to > allocate. > > While the ZONE_NORMAL doesn't provide any guarantees that memory can > get > offlined+removed again (any kind of fragmentation with unmovable > allocations is possible), there are many scenarios (hotplugging a lot > of > memory, running workload, hotunplug some memory/as much as possible) > where > we can offline+remove quite a lot with this patchset. Hi David, I did not read through the patchset yet, so sorry if the question is nonsense, but is this not trying to fix the same issue the vmemmap patches did? [1] I was about to give it a new respin now that thw hwpoison stuff has been settled. [1] https://patchwork.kernel.org/cover/11059175/ >