Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp606667pxb; Wed, 13 Jan 2021 11:17:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNtifkSaioKc6xcwhkqXaOVqNm8cBiQYHK/Z2p53lf1GaI2i9VnY91eO4sXtbXDl1Bc+G+ X-Received: by 2002:a05:6402:490:: with SMTP id k16mr2960314edv.71.1610565449323; Wed, 13 Jan 2021 11:17:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610565449; cv=none; d=google.com; s=arc-20160816; b=PrKD+2vj6NmNuLiZq1Qu1FucyoFU1ZJ3SwyBOyBtY0Y3E9kfS+6K2gxEtw7ZAxJx0w roF6c0ULQBsyxsYCf5aGbpqojkImrQK1DYhn5ghXabpxKc+wP4TfzwqbqWNck9UOCFPm 6VJPaqwM1GI1vDdlWTFWwXkOl0YAtkDnMW+Evnx4tbyyFLP93RVu6taTxjJf3wD1vOZi AGuLeWdCSz9Tkx9kOVlmkN0x0VAdJHHQZopCyZ1/Apb0eiWzgrvtcm3A3Omf0HT6uy7M no6AgKkcov4RFW36wlEymuW0bspSZDntF9w7x0TQO/JAoZW7+rA744C+/N8RLCWxNCbv xBTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5aTU8OrppExQUcP6FVeiibwynpQy0ibxwUp1/rbGZIk=; b=afpqA8C6+27E217oe7HUoVdONoBmRvlkAJU74iZCeS4Y++ZkwKULdZyPyObUcLHA9m FJJzG2awYAmmqTV6R8fWnV1kqNK94qqX0fX2A38y2lwYQSg60bDj6XEPEs8Q2vEIpyl0 KtyRlF4dIfW99cE11a1Uz2b/H7p8wXkxRqb0CHvq5HwRyapKY+xELsPyunqfWYF+wi8l R8HkXZdxvCwfRPbQqN5DFa1rK4CFmIuUBJ48DLz7nrl7dz9EBR16ajSBZDFv1GNwap70 6kdNmAMT6eAt8LPBnwRRmEP0kDJZquOJ+RmYLi5fyzLB549CWtPbJtFaw/dGVHlJIWGp xDTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=Sv2HxDCm; 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 u26si1484647edo.164.2021.01.13.11.17.05; Wed, 13 Jan 2021 11:17:29 -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=@soleen.com header.s=google header.b=Sv2HxDCm; 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 S1728516AbhAMTP3 (ORCPT + 99 others); Wed, 13 Jan 2021 14:15:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728279AbhAMTP3 (ORCPT ); Wed, 13 Jan 2021 14:15:29 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76584C061794 for ; Wed, 13 Jan 2021 11:14:48 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id q22so4685801eja.2 for ; Wed, 13 Jan 2021 11:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5aTU8OrppExQUcP6FVeiibwynpQy0ibxwUp1/rbGZIk=; b=Sv2HxDCmKXdyTqJ93g5cCHC3Kr+3XqkqB3PIINmwUzxMxz3rLg7O0Pve18wur4cvOH q0p03maFJy0DMmSNRHJaKyFe9v+xXJyoC6n5p+lEGKIN/GAJ4J4wmBBXHuiZ8DtLcKba KNhMl+iVZfSFWg7zudOzcZSqvldMoNqNHSixspx/r9eQF3/XwD4LOcrZmj7wybXwclGH tKR7S5SAM6MMrp4PxFE3XyhdVn02FCB+5TviGD1HKox42sye33wyHtq037S3LkEb/Idh i6CvY2oEbiaJLlctaIUe9/pLg7PAQ+CjO0cjYBX6nxK+FadK2tjf9J05wC1zQl1tKkXt MJVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5aTU8OrppExQUcP6FVeiibwynpQy0ibxwUp1/rbGZIk=; b=ub2+CS/mB/bEBn/q0XQE2Atq1+v73tztT0b7VcqbPFL48J5TYE4JARMpFyNeiVcy6P EidGQE1nDMqvC5BdCJhUvpCzKkpQXblW8r/OSdKa+nyzN7Nn/keI0xh3JSI6RKFcmJEO CNkRH56f2cUUi8k3mxvbHWsoUwjbREDRqx1CVosswHhLrsK4zKzaIxvs2ntvUh1RjDAh F/etLVPHqsdFsk3EOatgtFvWBbDktGVTVSuTzGy0PNBE9Wo6DIgricNBeArH0EEK53g5 x9lg5qkhamRBc7035WRc6b+efKHAdGYAf355IYaWqiV0FTOAIA6I5MmWGv5hx4KWj3is 1aoQ== X-Gm-Message-State: AOAM531NzyN65NjXsbMhF1GTrfKtsLsYRqLvMj6MEz96ptgnYJ9xtSJ4 cHfoGXurmG42SF3K1dcBQnPQulF8C2H+qhWJkUTCJA== X-Received: by 2002:a17:906:7d98:: with SMTP id v24mr2664891ejo.129.1610565287094; Wed, 13 Jan 2021 11:14:47 -0800 (PST) MIME-Version: 1.0 References: <20201217185243.3288048-1-pasha.tatashin@soleen.com> <20201217185243.3288048-6-pasha.tatashin@soleen.com> <20201218094324.GT32193@dhcp22.suse.cz> <20201218130825.GY32193@dhcp22.suse.cz> In-Reply-To: <20201218130825.GY32193@dhcp22.suse.cz> From: Pavel Tatashin Date: Wed, 13 Jan 2021 14:14:11 -0500 Message-ID: Subject: Re: [PATCH v4 05/10] mm/gup: migrate pinned pages out of movable zone To: Michal Hocko Cc: LKML , linux-mm , Andrew Morton , Vlastimil Babka , David Hildenbrand , Oscar Salvador , Dan Williams , Sasha Levin , Tyler Hicks , Joonsoo Kim , mike.kravetz@oracle.com, Steven Rostedt , Ingo Molnar , Jason Gunthorpe , Peter Zijlstra , Mel Gorman , Matthew Wilcox , David Rientjes , John Hubbard , Linux Doc Mailing List , Ira Weiny , linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 18, 2020 at 8:08 AM Michal Hocko wrote: > > On Fri 18-12-20 07:24:53, Pavel Tatashin wrote: > > On Fri, Dec 18, 2020 at 4:43 AM Michal Hocko wrote: > > > > > > On Thu 17-12-20 13:52:38, Pavel Tatashin wrote: > > > > + * 1. Pinned pages: (long-term) pinning of movable pages is avoided > > > > + * when pages are pinned and faulted, but it is still possible that > > > > + * address space already has pages in ZONE_MOVABLE at the time when > > > > + * pages are pinned (i.e. user has touches that memory before > > > > + * pinning). In such case we try to migrate them to a different zone, > > > > + * but if migration fails the pages can still end-up pinned in > > > > + * ZONE_MOVABLE. In such case, memory offlining might retry a long > > > > + * time and will only succeed once user application unpins pages. > > > > > > I still dislike this. Pinning can fail so there shouldn't be any reasons > > > to break MOVABLE constrain for something that can be handled. If > > > anything there should be a very good reasoning behind this decision > > > documented. > > > > This is basically current behaviour, after patch 8, we can never pin > > pages in the movable zone, so I will update this comment in that > > patch. > > Then it would be much easier for review to state that the existing > behavior is unchanged and do not update this comment just to remove it > in a later patch. Because this patch should be straightforward change of > the condition which pages to migrate (+some renaming which should be > reasonably easy to follow). Makes sense, I will update this comment correctly right away when the behaviour changes.