Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1006429pxu; Mon, 23 Nov 2020 09:17:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXusm4aqdGcWeHF14nIjVCGI1CmgaDkA1oTIOV7kAU7gtrBq4mNfS1JjWfz8al25s8rx/D X-Received: by 2002:a17:906:6dc3:: with SMTP id j3mr582474ejt.320.1606151866078; Mon, 23 Nov 2020 09:17:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606151866; cv=none; d=google.com; s=arc-20160816; b=W7aO+R9Qj3vZYCBfP9vPgUJK0HPxC/9117/Wv0GSSg1Tx3proRjgAspSQMmbdLJXTx 4DAE0JyNpGm3noUe9WM8qdMNByvZ6LhiWzWu8SqzCC7gyx2tFcxGjKlO/lAmvaB+NaIX VvvMSXbapPhn+Z6jH+VnUG6AtgGI3pJkWPkZeTI4iEYgY+QQhGD6GTI0ZfPMwEqrN9vO Yk/ov1WCC7r+TuD5IVsHUuI6iQCWtGESSi2bK5oTcYiTLkNuCdVp5ie6lBpZ3DBWVxTf u/xDT06RxqCiy3UD6nmsDRpEt5c4liW7sIuMtVB5Eohkj9BXpc283wo7RUkI3IqDSOmK iujw== 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=kvBGtFT9p+lNN1wnKJ27cKqo+mVo01rfpUdq4ICcnCo=; b=SotXlvDiNoQ8aNaGEN1DLnCAMQh+KBh17CyTDx8V57jnfmkfVszKMi2C9vKsL6Eddo BERaLTKnew1zxTzSyMsGu19bjBM9/kN6btrRxHuaWJeZ38cE7HEz+83jameZhUdaMQuj fMyu+qKYCb7P50Je0NF1p5Hnln0FUdvbnADDlOPjzuOa+iAy2ahoZfqMYIdBoz7j6DLz 2YKZ+/5fGqeRnIuO2qc2gxF2NJKrfALs+zD4zt9KLCP9AgCofxSje+1CcnWmkXWjgz2Q i107eDFkY6vh3UTWyXivOeUL+UCTlhE/u0IF28K/+AjgzFiVxvvNcrm7tS9cax+VDiib QhOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=LlizgBvV; 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 k19si6659652ejg.380.2020.11.23.09.17.23; Mon, 23 Nov 2020 09:17:46 -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=LlizgBvV; 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 S2390248AbgKWRPG (ORCPT + 99 others); Mon, 23 Nov 2020 12:15:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733152AbgKWRPG (ORCPT ); Mon, 23 Nov 2020 12:15:06 -0500 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1C9EC0613CF for ; Mon, 23 Nov 2020 09:15:04 -0800 (PST) Received: by mail-qk1-x735.google.com with SMTP id u184so3068308qkf.3 for ; Mon, 23 Nov 2020 09:15:04 -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=kvBGtFT9p+lNN1wnKJ27cKqo+mVo01rfpUdq4ICcnCo=; b=LlizgBvVF6PIc8dJ2FLojBbEJZlK9COaX2vyuLyDC9PG/wNw623YnlNybC47WpFuiv PtYA6ubE3P7QBehYPVwSYRflyWgHrmkjugD+nCjHntymPepmKyLUTwugEfYW3Nw2P2SP hrxib78j7pTNqBYSvjBMrV4x4viFURYxEkgDpKYhm9Y92yo6qzxSvybp8ECcjZpITAZf qvC3hDeripEmGZQW/kh5aGtYhMpLHrN0Q+LEDhznEStp4gDxzc8nVB5YJ8yF6rmFEmEQ HmH6JVP9m7vwxphnbgUdVGbN4ebQq4wbUeA/lVItKFo6EAa2EvHcBZ7mmhOo3Tww4s3V OQWA== 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=kvBGtFT9p+lNN1wnKJ27cKqo+mVo01rfpUdq4ICcnCo=; b=kpf7rlPYA1OfglvOvoRJgXw8jm74z6ki5r4BmQuQS2spKGqQLR7+oUuuS4uS+9j7L/ 3ThisOm0oQ9ZdSl0pSc2wBdfZAa2j+484WxZP32Wgc+ud5YoDSzuZvFJc+/CCnw2GjDA jqLG6SvHC09tyF7+DSJT39pRBrtgiEVG9kCyA0iOUx2PTI0kw7XAm7zfu+NzOidbFfrV 04Of4O7IZRZycsLjzotnRBAcrO7QIbkyvc+wlpccytUmUa4wFG9JnmmK+ouKTH0YqGVW g46Is7PdVj9xDXtdLT3xbW8OdG+/Lx3mebWBJ2fH/DZcNMf/dVDgjlxx2xRrBTcMeJnt 4spA== X-Gm-Message-State: AOAM530RXWCdNIjHpmhS079EO7/IeXg33oPnEotMWl6PGSZR6W1XYqhq W5U5FU8nMYXuOHi5/HnDwpRJdg== X-Received: by 2002:a05:620a:ec2:: with SMTP id x2mr484822qkm.328.1606151704157; Mon, 23 Nov 2020 09:15:04 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id z133sm10523570qka.20.2020.11.23.09.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 09:15:03 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1khFQc-00A6rX-Ou; Mon, 23 Nov 2020 13:15:02 -0400 Date: Mon, 23 Nov 2020 13:15:02 -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 , sthemmin@microsoft.com Subject: Re: Pinning ZONE_MOVABLE pages Message-ID: <20201123171502.GX244516@ziepe.ca> References: <20201123090129.GD27488@dhcp22.suse.cz> 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 11:06:21AM -0500, Pavel Tatashin wrote: > What I mean here is allowing users to guarantee that the page's PA is > going to stay the same. Sort of a stronger mlock. Mlock only > guarantees that the page is not swapped, but something like You've just described get/pin_user_pages(), that is exactly what it is for. 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. Jason