Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1061369pxu; Mon, 23 Nov 2020 10:36:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyB0Sa5fBN/JPZK47Ck0TSAGKHvY28Bt6tYc2nHgvzymR3CDaF1pHM63FB3P5B/wcECrkRN X-Received: by 2002:a17:906:6b86:: with SMTP id l6mr851867ejr.524.1606156566434; Mon, 23 Nov 2020 10:36:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606156566; cv=none; d=google.com; s=arc-20160816; b=nOO8Me308Sfe2ND0TbCr5FmWZr7DkV6NsgAJ0o3dDlGZiO/yZmUFMzRn0PEJD4mTWH Ny/5Bs1cYtI3za65T+tW4HXyZ0OCz1pLIBQ+5z8pHIZlkBp7NWwS8TVQ54VRDAwPhKky yMXS2c5nJczEy4jZ8RgB33m+sJJxKob7Nsnqj76DOQiJ1yWCz3mgBq6yRGK/4Jncv4U0 kqRwLTDZ8O40rWGxfc0Be67jK3xxZbA/QNU4oilPBmciqLnAnndMIQmUJowpZ5Deup8O NZYMpt24Cn0rHlmwro+LugrhoRiJnTD3SNJ8I3T2Pyk2ce+SpKlgOR1zUFuEP/nigLpW qi6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1u1sy4wI1CG6DZFHVu5ifgXp/o8YW2xyOy2wIPWsfUg=; b=tuuZyO7Km0x+CjSc1eRhT1qwuzElUVUt5t1g7xK48VfktkXddIK3N6oxtryvrUDC9t Fo5JeAHcy3ttvlZT6B1OgxbWNCar6sdw/KVTCTZ6VkVMWjaMGi8ahpRRk2vQdcIGq3M3 2hFjGHK7WGrPxO1QRbow2JnQmGadsycI7U1eeaAXsrlHcKvdtzI062lJS70tnL6oxBNd bZI117uad8TMx2Mj92WPiSBai0pHh8jvZ+sWeMQQroycgw/yFOq7KTdtb2aiW2aODOjo Xc9QjiVuhk/jV/U9xrD98t2J5uVu4gowMNqRf8kz2FNOFZtlgDfXb/9xU4hBBkOZhNjQ bakQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=gih3TBU2; 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 rn28si6959390ejb.585.2020.11.23.10.35.43; Mon, 23 Nov 2020 10:36:06 -0800 (PST) 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; dkim=pass header.i=@ziepe.ca header.s=google header.b=gih3TBU2; 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 S1729310AbgKWSeX (ORCPT + 99 others); Mon, 23 Nov 2020 13:34:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728868AbgKWSeW (ORCPT ); Mon, 23 Nov 2020 13:34:22 -0500 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51855C0613CF for ; Mon, 23 Nov 2020 10:34:21 -0800 (PST) Received: by mail-qk1-x736.google.com with SMTP id b144so3404438qkc.13 for ; Mon, 23 Nov 2020 10:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1u1sy4wI1CG6DZFHVu5ifgXp/o8YW2xyOy2wIPWsfUg=; b=gih3TBU2ie34aPD8GCBnr1hlEWJpANCJd1L/9e5q6wM6g+ySzsAsQAkZeX5ov0bm8w KMqGD2zqx81lskimJnNbWmiTfCUUH6V6jfRnz+RYqcsGIDgL+0BgOk+8BQ3zc2dgAbkX rm2QbI1sEI16WUkwm4BhRtfJkKA3OWLu9si/MKlfvUaXUekcsf3+iI++DV3ZhOfCd59z C8P60qh9BjLwDE4nOsf4L3CDrVjlYUdZ9vFSnY+7pMSSeEqky1SG/4txkpavUjNXUQZS iubB+g078hid8l+LWwEwpfH7l5JQjzSnu65jBT+60rf46aLEzD5Kf5G8050vlyTy+aBi EccA== 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=1u1sy4wI1CG6DZFHVu5ifgXp/o8YW2xyOy2wIPWsfUg=; b=uBfnr3116iVW8zfEj5oo76AGhV7Npdbi8r7wPhoki3jDbONjm/eO8zGHCSvXPHo6Ot tzW/uP05gsO4kiJOdlgdYVSe03qPoYnQAe702II09cLl5PkunqQLj0gfwHs9aBpmeiKa jV0GiSOld4uJbboAwrrfgj/uyHwj29bNUTPQQ0+mNZOM66mETDrxIEjofEAYfzpqLpIN LVTXsD3Og7tvEO2Kv+dPKX//7l/OFg6WJJqGxm102ti4UE08ICmL4WG9HSvBvQItBbBs MQjh2LWPcOdIYTHCA21vpV/IhQyiNZL/fu+GFTwV/sWUcw1pA+SFVknD/VMcjmSlQFM4 WgvQ== X-Gm-Message-State: AOAM532M1ETWgaALrmnz1py0t6i0n4ggdGxgt0r7gJ7UG38Yf+t0pSP2 +3vFlhB/AIXjgQZGkYeL3Anhnw== X-Received: by 2002:a37:45c6:: with SMTP id s189mr813608qka.472.1606156460610; Mon, 23 Nov 2020 10:34:20 -0800 (PST) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id x21sm4956921qtb.14.2020.11.23.10.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 10:34:19 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1khGfK-0001k7-Mn; Mon, 23 Nov 2020 14:34:18 -0400 Date: Mon, 23 Nov 2020 14:34:18 -0400 From: Jason Gunthorpe To: Pavel Tatashin Cc: Michal Hocko , linux-mm , Andrew Morton , Vlastimil Babka , LKML , David Hildenbrand , Oscar Salvador , Dan Williams , Sasha Levin , Tyler Hicks , Joonsoo Kim , Stephen Hemminger Subject: Re: Pinning ZONE_MOVABLE pages Message-ID: <20201123183418.GB5487@ziepe.ca> References: <20201123090129.GD27488@dhcp22.suse.cz> <20201123171502.GX244516@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 23, 2020 at 12:54:16PM -0500, Pavel Tatashin wrote: > > I agree with the other emails, ZONE_MOVABLE needs to be reconciled > > with FOLL_LONGTERM - most likely by preventing ZONE_MOVABLE pages from > > being returned. This will need migration like CMA does and the point > > about faulting is only an optimization to prevent fault then immediate > > migration. > > That is right, as the first step we could just do fault and immediate > migration, which is silly, but still better than what we have now. I was looking at this CMA code lately and would love to see a cleaner/faster implementation. If you really understand how this works maybe it is an opportunity to make it all work better. Jason