Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2053019pxu; Fri, 18 Dec 2020 04:31:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPANZvMLUzdsiM+ouVHeVnSRlZBNpTh/IO+ncXU/1Py5g6Fti2ifK402nTj6OemAgyFXLV X-Received: by 2002:a05:6402:1d24:: with SMTP id dh4mr4106887edb.161.1608294691804; Fri, 18 Dec 2020 04:31:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608294691; cv=none; d=google.com; s=arc-20160816; b=GLfLE7312fihySkeDwUyzaexwFDcZCBxMXZbFVO1oo4YYL9EgbqnKe+YxV2meBMabH oG44nUxfL8pXiJMHzQnsJyJjI1T6y3Ikvsduou6qtHcuiZMGT4UJ8eXqebu/4H3sZuh9 ui9GIyr8pzDVkmP267+jdu1MHDwynZrA72ujaKgptesW41EH0CcjT0XQ5mAxnUP0V51V FZTb19XDNXc5l7Uybjtc4NQWYcalCQO5guzEv2/y53Eo+IQ7m+faeZdEr39QQDB8H1TJ ohb8rz76IqORh8KWbtFY+ixv60gm/KtGPhkvL8PA8T/40QKOK/fyvW0fJu+8ULkvXD6r fy1g== 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=3lhuweqQlhHO7hy/V02BEkOocTAj67fYHbIRgEWFXLs=; b=vFvAysj3XzN13Q986w84l6UJd5WZiI3NYE6z5JTcSav1+4Qe109CkPTQZE1oSnnBq3 4cbTcozaZKIe3YMQtO4KcG0+gOdt00vn2c8AG2hoensLUJic/7gOjFYl8iodTwSAFrlW DfZYzK1FY2cLmfQboNBlmWuKp7SGtVcq/9fQTOmiWiFs6YfJ/maIXCIjKlGw0qxRQM4i z4271bv4bNZVQfXqnx0QVDOdV8J21yWWsiheMeWowI+0Oah9Eyn8ID/ICFmm8SeqLaHO /p5cPWTFdlcau3ILJ8GTXuYO+UefvrjRCK4LyTb1R2angSGGgdBLFOmKOgEty2RvyLfv /BVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=MJ6K37Sn; 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 os24si4551767ejb.680.2020.12.18.04.31.08; Fri, 18 Dec 2020 04:31:31 -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=MJ6K37Sn; 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 S1726624AbgLRM0L (ORCPT + 99 others); Fri, 18 Dec 2020 07:26:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726616AbgLRM0L (ORCPT ); Fri, 18 Dec 2020 07:26:11 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6152C061285 for ; Fri, 18 Dec 2020 04:25:30 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id lt17so2958127ejb.3 for ; Fri, 18 Dec 2020 04:25:30 -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=3lhuweqQlhHO7hy/V02BEkOocTAj67fYHbIRgEWFXLs=; b=MJ6K37SnOv0MOV1yNPGIsCJSfLdzIW59btJg0j0VNKWwYOIneNWAlzLezFS+4P1UIg kvtBTojCVh9e1FShHJeAPucWvI2ftbOUroXc3gg7yM9AHLhxecDsp8JqaLP16g3CYZ95 KNP1Cnk6441ZWkLzWsRgdtvMxmnJkXOKrDk8xEK6tCfLPgJxrVR4w/situU0UMdI+ZPY SogVsfeoRkuyNuOHCbCzgcc9dcFBT5d5ugBKWROYrsUZM6AezfJFecEcH9aIqwQZ1vsU gurHn2N1ewEy9LbesQUw63usbfVnz6ZqRvJr4uYOp33JrXL8bIpGh2UkjhHGhGLVcJy7 FOPg== 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=3lhuweqQlhHO7hy/V02BEkOocTAj67fYHbIRgEWFXLs=; b=OXg8534btIjkIepo8/9W4EdaCwx4wAn5hxQQyyCw6qcQxK5Rc7BPxHdoDkZfxTuTJo tE3Ylj0ZH11z0V+R86YbUrBmow+Fdjm0/LFdx4c8x1Vqklt7ef0Xq6OR8tX27IczP1OJ fj+ArD74n1KPzLjGcW0xTR9X8Ti2GQ4ZKVDp+HDRar/qUf7xSprPFZ/mOSJftrjH6fz/ 6ukqGgzL2KFKRxVyJqyDLrOVvqV3/51QxHfvR7cwC+h5yek5nvzDEjK6VrAi42ivtIPl 2xlXx/6m/sSJYC2qycWPlHeM6oDgrc/TkcNt7KuiIj+Da3LZ+poRbDGx6YnXLe4Phosl +UsA== X-Gm-Message-State: AOAM531qrjaWkf6tQmxGOdbFJT8IbcYp2HMERj9P7MVwkjisE1jL/UYh TMiEGDqhH8YYfitHiTAGG8odnBKiyPyUi0n0kkR0NA== X-Received: by 2002:a17:906:ce51:: with SMTP id se17mr3761264ejb.314.1608294329649; Fri, 18 Dec 2020 04:25:29 -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> In-Reply-To: <20201218094324.GT32193@dhcp22.suse.cz> From: Pavel Tatashin Date: Fri, 18 Dec 2020 07:24:53 -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 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. Thank you, Pasha > -- > Michal Hocko > SUSE Labs