Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp776204ybe; Wed, 11 Sep 2019 04:38:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlgxKp6D8KSfswGsmDjhh2nEEQ6JI6Jvc3reQ0pPSpT1EFrItq88OSSYvSST1RkmvO9oT8 X-Received: by 2002:a50:858a:: with SMTP id a10mr9056719edh.284.1568201917854; Wed, 11 Sep 2019 04:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568201917; cv=none; d=google.com; s=arc-20160816; b=ghs0dktFlv8Q5t8/pl8IK4KgNb8xd19yjQMtE5WlfV3c3rJ/UFl55tHOc6c8/ZAhKh x97ZE3rPhZbrR18ftDrt9sIaT+dSNjZ0xDYGD/chqh7STyHkIlUMLiKQrBhtPaC1FozX lh7Xz/57OSZA+6FszalNKOgYl3esi3gLTshw0NlTY3S1JF0AyPQh4SCPtCifljvXo6SM 6zI2B98LfsBCLQK5sobXj+hfJlgwMomx5I/p4yTp2lgw5Bo/OjJsOatg94yU0vYrXxeN ecg5cOEvNwV1z9iPmjMwgetb1KJv2qPvt1DMSMd/06eYLU0/SJMYukqX/v5fRPB6RXM7 ASQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=uvNfrEQkrl9XXw8uCM9N8oRAwZA23eay8X5rboA/3yo=; b=Vuyd3B/rToYDMs7sshP1E1MOC0F+V4P6xHtlA9sPMbPenQ8UY5rEo9d17ENP2TuQAX 3v6WGisEq3bzony5VyetvAbT/+Zqwf13Xn9cJjtB5ZHiv5OT9p5/xhwzX/o+QMGJ46O8 +TQMLwP8Q/Hg+rlksS9N0wG51RIIuuBBwoh0GOenJl7Vv1HAJGPMboH2OF4BbbsfzkFO KFATvG4fmbaJTT9/Yckd+c3kfIsFneh+8GBEpwXtA5FsnxUdmtuolM1QV3+Xog2cQPBi Gwl7ymzr1bqNTSNJ5E8iYyV9SuA70xhsxZBWXOeqc1tJof53thQ27Og18TCKFc3QjThQ VqSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o16si10954780ejr.190.2019.09.11.04.38.12; Wed, 11 Sep 2019 04:38:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727656AbfIKLgX (ORCPT + 99 others); Wed, 11 Sep 2019 07:36:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:51928 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727302AbfIKLgX (ORCPT ); Wed, 11 Sep 2019 07:36:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 038DEAD08; Wed, 11 Sep 2019 11:36:20 +0000 (UTC) Date: Wed, 11 Sep 2019 13:36:19 +0200 From: Michal Hocko To: Alexander Duyck Cc: Alexander Duyck , virtio-dev@lists.oasis-open.org, kvm list , "Michael S. Tsirkin" , Catalin Marinas , David Hildenbrand , Dave Hansen , LKML , Matthew Wilcox , linux-mm , Andrew Morton , will@kernel.org, linux-arm-kernel@lists.infradead.org, Oscar Salvador , Yang Zhang , Pankaj Gupta , Konrad Rzeszutek Wilk , Nitesh Narayan Lal , Rik van Riel , lcapitulino@redhat.com, "Wang, Wei W" , Andrea Arcangeli , ying.huang@intel.com, Paolo Bonzini , Dan Williams , Fengguang Wu , "Kirill A. Shutemov" Subject: Re: [PATCH v9 0/8] stg mail -e --version=v9 \ Message-ID: <20190911113619.GP4023@dhcp22.suse.cz> References: <20190907172225.10910.34302.stgit@localhost.localdomain> <20190910124209.GY2063@dhcp22.suse.cz> <20190910144713.GF2063@dhcp22.suse.cz> <20190910175213.GD4023@dhcp22.suse.cz> <1d7de9f9f4074f67c567dbb4cc1497503d739e30.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1d7de9f9f4074f67c567dbb4cc1497503d739e30.camel@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 10-09-19 14:23:40, Alexander Duyck wrote: [...] > We don't put any limitations on the allocator other then that it needs to > clean up the metadata on allocation, and that it cannot allocate a page > that is in the process of being reported since we pulled it from the > free_list. If the page is a "Reported" page then it decrements the > reported_pages count for the free_area and makes sure the page doesn't > exist in the "Boundary" array pointer value, if it does it moves the > "Boundary" since it is pulling the page. This is still a non-trivial limitation on the page allocation from an external code IMHO. I cannot give any explicit reason why an ordering on the free list might matter (well except for page shuffling which uses it to make physical memory pattern allocation more random) but the architecture seems hacky and dubious to be honest. It shoulds like the whole interface has been developed around a very particular and single purpose optimization. I remember that there was an attempt to report free memory that provided a callback mechanism [1], which was much less intrusive to the internals of the allocator yet it should provide a similar functionality. Did you see that approach? How does this compares to it? Or am I completely off when comparing them? [1] mostly likely not the latest version of the patchset http://lkml.kernel.org/r/1502940416-42944-5-git-send-email-wei.w.wang@intel.com -- Michal Hocko SUSE Labs