Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp809468ybe; Wed, 11 Sep 2019 05:10:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqza405ypFdf+dwknOdJu7lh0TlRZRspEOl4w10tynvoRGnLI55vugQk8PdG4PJgaN4Vh3oK X-Received: by 2002:a05:6402:1426:: with SMTP id c6mr19902003edx.53.1568203859062; Wed, 11 Sep 2019 05:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568203859; cv=none; d=google.com; s=arc-20160816; b=uoErp/Hlb5d2YMwAZMAHHzzmixv4IeLpP4X6NWCyh82SSJDpmEjb5SGtFQTe2ru9Pe HglxMeUQUoe6JGavhwz03SoXxE8vmpwHzduiMB3IHDFnGQWorGv3ROechQ1Os823JSVy wu6x4Pe474Q0HOcflgMoQrmfMY2838CqiXasaao4FLNwm+l5zt02oMoit0Qoco23hnel osFpVNar/UYloAOBSAXABghdw47/0J6Zk5M1XkbiQ7jMBXRTG4qGHTOn+YgXqjDJtxdX 5oyYYa32kaGEe13mHhqyHNEqD5z/q76kg2ISCvo8IeqkJRheALlyFZPZU9sPtQrPVcj5 gnCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=enh0zIvHZGYnRPPPLW+6aSKLca0Arx8DkKfrIqKoLus=; b=kb8rS+zse4oN4itJnBDimdBRsuMwT9vONMtVLveOhaioOmgmvL7nUcw/GR5f1kWueC QlC2NpbmClEYYr8IhEOPM6QRmdcan93M2BoH8VtgpZGhhYn0RvLUXIK/8QsL6AVucPqK NuZCqHlWZ+GfXwElH8XE1lo/22iK37P2zv1yvwB084UUOiItHbRi/1yK6eVplr7IwHSx 8ybbvb3s80LXINeJTMgbXhw8IPH/fGv3s+RhoZNheKzORjZeau4sLqUAGIy+fTiwJD8D cjsXh7fQoSsOwiYfR/wrv7k6o4Wkx/BmblaQyKqI4aOWEiQ9FPSk+S9cOUShJgaGOZJh yO6w== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m26si10986350eji.61.2019.09.11.05.10.35; Wed, 11 Sep 2019 05:10:59 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727805AbfIKMIu (ORCPT + 99 others); Wed, 11 Sep 2019 08:08:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60678 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727373AbfIKMIt (ORCPT ); Wed, 11 Sep 2019 08:08:49 -0400 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 10F9F7E426 for ; Wed, 11 Sep 2019 12:08:49 +0000 (UTC) Received: by mail-qk1-f199.google.com with SMTP id n135so24642362qke.23 for ; Wed, 11 Sep 2019 05:08:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=enh0zIvHZGYnRPPPLW+6aSKLca0Arx8DkKfrIqKoLus=; b=BCvindC1Ph6b4wBE1KSQ8Amhw3z9pHRZfr9i0MozI2OGS6mOOHDSXcu2rQe6CsoTLu rURzpa0oXjT1JYrGiF18hn3+3JzYMkBElRA5oWDAVAkV3mM9CJapwWxJKjOcd20h6l8k OpxeRLMzp+xo8Re4x8F2mZdutlrXC4JY0Q5HGa4ai7s7iWSRTgooyoePaBwbsOlkID9L x+SAqJFD5ayZ+hetCo30oLzIGKzhpJEtxiMU7VgelgZlgMGiVnfY9Z1LEYK9bSYStX0+ vtx2qGXXPuU6vTJ8yuPPH3r5w9hGMpHVFriVaHY+39VSPf+1M3NslWvJEvuR3dw+AGz2 OW5A== X-Gm-Message-State: APjAAAWL4+ZQmgK87eZHJmgf950pHav6XyMBfXpBOEGpdQ0Zo7WzByhv qmEPGYxMFR5SLmDAePU4Ox73LdXQu6EAODYMDX2t+Gug+M68dnbSwaTph8M7gZdEl7reitcCYAy HlPAAPrxZ9P2xSTQYDYjiT2Hi X-Received: by 2002:ac8:3564:: with SMTP id z33mr18649588qtb.291.1568203728303; Wed, 11 Sep 2019 05:08:48 -0700 (PDT) X-Received: by 2002:ac8:3564:: with SMTP id z33mr18649552qtb.291.1568203728135; Wed, 11 Sep 2019 05:08:48 -0700 (PDT) Received: from redhat.com ([80.74.107.118]) by smtp.gmail.com with ESMTPSA id x12sm8228721qtb.32.2019.09.11.05.08.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2019 05:08:47 -0700 (PDT) Date: Wed, 11 Sep 2019 08:08:38 -0400 From: "Michael S. Tsirkin" To: Michal Hocko Cc: Alexander Duyck , Alexander Duyck , virtio-dev@lists.oasis-open.org, kvm list , 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: <20190911080804-mutt-send-email-mst@kernel.org> 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> <20190911113619.GP4023@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190911113619.GP4023@dhcp22.suse.cz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 11, 2019 at 01:36:19PM +0200, Michal Hocko wrote: > 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 Linus nacked that one. He thinks invoking callbacks with lots of internal mm locks is too fragile.