From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D39D4C433DB for ; Wed, 13 Jan 2021 19:14:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 656FD217BA for ; Wed, 13 Jan 2021 19:14:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 656FD217BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AF1568D008C; Wed, 13 Jan 2021 14:14:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AC7478D006A; Wed, 13 Jan 2021 14:14:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DCEE8D008C; Wed, 13 Jan 2021 14:14:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0072.hostedemail.com [216.40.44.72]) by kanga.kvack.org (Postfix) with ESMTP id 85BC18D006A for ; Wed, 13 Jan 2021 14:14:49 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 50351181AEF39 for ; Wed, 13 Jan 2021 19:14:49 +0000 (UTC) X-FDA: 77701703898.22.smash84_22066e827520 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 2909418078839 for ; Wed, 13 Jan 2021 19:14:49 +0000 (UTC) X-HE-Tag: smash84_22066e827520 X-Filterd-Recvd-Size: 5314 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Wed, 13 Jan 2021 19:14:48 +0000 (UTC) Received: by mail-ej1-f45.google.com with SMTP id ga15so4677001ejb.4 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=LsfIz4GYahQJdTqEaRIMdh0lRLvVqo6aZEFri2AKDUT7U9b6MHHDpoJoA+GTY2EXYJ L/poe/r4slZMc7uLDqqnEicCWlFcLhK7ej6cjN+VROysT+mfZvi8wnGHygKICtUvVtqW uDSSClzNq2q6VoUpVjLlHVZk9bPuz3EIoyRuTunlPVRwsojHURD+0jbFg1uO8Et0n4x4 02XTfXVGCnlZRoIPMh9XWxhyjWijRolsjWoNsS/Qdn3Y6OgRdbnha02LUzDnXedbrA6U 2LxFgDw57PEy3XhL63XiRNyA/MoAr5KfPoc3hAZ9Q4vIGK43Dbqrg8uh2znYDGwbcTE8 COWw== X-Gm-Message-State: AOAM533TwrwQ4/Y1OJXu1PfLTy0UqCSSr7VlKu8qM8V0qRDhqmAFsrOw VjJ5r3Bm7FoNzKOokjUEiUbeA6Gt8Iw4TBVwgj03gQ== X-Google-Smtp-Source: ABdhPJzN7cj8lor+g6eQXIJKxLe3OOGnVmi1MMEYtrIoJZ2nMFFGpb7NnFptxtpKrs9BIibDNfPkEmFPZXevSHQ0Too= 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" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.