Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1655442pxu; Sat, 12 Dec 2020 22:18:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzV+xMXjS36yGslG79BOhEwPv+0XootspLcGG1i1nGlAPptWp6KomNa6jeQA9ptNvk3ia/v X-Received: by 2002:a17:906:b101:: with SMTP id u1mr17791855ejy.457.1607840317700; Sat, 12 Dec 2020 22:18:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607840317; cv=none; d=google.com; s=arc-20160816; b=ZPaFo99X2TFA+217wCxZqz3o6yB37LnDPrWpbMVzn8/grjyyKi9cJQwl1Wkw5R5JC9 ZXOGSoflJOIdjpFQ80SujJkZQvYi7KY8Lo4LU7HcyyrgQT+xl88VnmLuL4jhsaDFb8ck QiFZcRVsLMAK1oRt7MoQShMvem992m/vDSafeLGjqb1UmmCeRRW0h0/dUqLNYZIcNv9O bcNWCyZGlEgCnJwA74dqSRDd+Cw/kL/g0iE1qzMyEWwq3srYXwrPCOjHqUE6HiXW7Lak 9zZrzXoj4m1FOz9u+7jhVLi3Rb+ts6Go8UxDMs3AFfmHFEHLV3eUBdcJULfCC68fKBol Jbag== 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=HrpGpeVouHWBAWlwrnZQ4b3o3PuUhfDT7U1jbXkeBu0=; b=cbk25BP4bl9z4MHoXdh8LVb1aaWYWl1RiAf4kqCFaii4V+3j/cjwLiec0Hz6SH6nJf 8uOOxuiup90nIIrnqABW/4MrDFEmTcvuJXS7mZrL/rPWtXVQZ4a/fdixjcYXvzat4xPC F+965T0+cEuyW/IVatMerQa0qqvtQqYYEE4vM+a9U79iXumKpyJIdcWB+KyxwEK/sTNT deWF8R9ibKT7mdGEq+grlBw4CLpPJPWBHXEdRCxT1kd9nP7zR24znSmCgBYErM6mHsmW 4BKHdFaAvFDO4/HmvUqWVQgi6dVvgaECb+pmNQ64JZQEymxW3i0PZcw1nYTNqyGCHOFR v5HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=GkXTizU3; 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 j17si7409776ejk.231.2020.12.12.22.18.15; Sat, 12 Dec 2020 22:18:37 -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=GkXTizU3; 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 S2407235AbgLKXuv (ORCPT + 99 others); Fri, 11 Dec 2020 18:50:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407240AbgLKXus (ORCPT ); Fri, 11 Dec 2020 18:50:48 -0500 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFBDDC0613D3 for ; Fri, 11 Dec 2020 15:50:07 -0800 (PST) Received: by mail-qk1-x743.google.com with SMTP id 1so10248640qka.0 for ; Fri, 11 Dec 2020 15:50:07 -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=HrpGpeVouHWBAWlwrnZQ4b3o3PuUhfDT7U1jbXkeBu0=; b=GkXTizU3ycac1nelpZF2sNwUDnkJz+uMtcieEL8oScb/rVsKe9rafWpqBC7NOxOPn4 f4bbSpVGMC2pK+wSiXWHy3ydET3zlc7CsmT9WXsaxYTWGKWOtBmsJiFY/4s86W0SDS59 GeEuQdfKrA3twfw40/pfwcJR/neFN5aGRZVppTKKoxZnCxMua4Lnd9mCkqyQkNQJH6B3 TxNb3EcXzodCmFq8AmRiIXZTgOncSfUI0GsMML3F+KF90CPFhhY5+rMKX31FpbnHyNry 9AKN/hy8qVJY4/JcrIbXDI+BvczTI11Evh7DMHoe7XtKHBa9J9HFBgZqVdipReMAWcaJ CQnw== 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=HrpGpeVouHWBAWlwrnZQ4b3o3PuUhfDT7U1jbXkeBu0=; b=XP7u8Zd8r5SdKtrQPb29IYwB85Cy72pFhdnqek7s3XRfQjzSDBEBTkUaMXbNa9X9KN 75auNJ4++eTIgVAXvPIp57a7DCDhr3Ip7ejJlvYZU3u7Nls96+7Fdm82t4tFaNkB32f2 E1k32THB99PzuTMDY0SsHXjnitOrfXAhbhd/qxcy0mQpWU11d8C7S6hcImX5tuG08IIg RvhB6tInpKrjTFj4KYFHg5Wl+DR8Do7n+UClZX3RUZV7uszP1R5DcvwukpmaALaRKv0k jKMr5BrFvSNKdDp36rvceruTq8Fou8wZvc92ILVD0O9ka0/GULDIWiIAnkK7WhQnOBjh 7ajw== X-Gm-Message-State: AOAM532xju9UDI0nobROizTx0NuUWtcBKr/YGer3+Hu5S3DXhHfAAWMA 1I3gBE0H+c597ixDZRyz7rbnQg== X-Received: by 2002:a37:c92:: with SMTP id 140mr18588142qkm.152.1607730607157; Fri, 11 Dec 2020 15:50:07 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id v204sm8719490qka.4.2020.12.11.15.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 15:50:06 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1knsAn-009OHS-Jq; Fri, 11 Dec 2020 19:50:05 -0400 Date: Fri, 11 Dec 2020 19:50:05 -0400 From: Jason Gunthorpe To: David Hildenbrand Cc: Pavel Tatashin , LKML , linux-mm , Andrew Morton , Vlastimil Babka , Michal Hocko , Oscar Salvador , Dan Williams , Sasha Levin , Tyler Hicks , Joonsoo Kim , mike.kravetz@oracle.com, Steven Rostedt , Ingo Molnar , Peter Zijlstra , Mel Gorman , Matthew Wilcox , David Rientjes , John Hubbard , Linux Doc Mailing List Subject: Re: [PATCH v3 5/6] mm/gup: migrate pinned pages out of movable zone Message-ID: <20201211235005.GE5487@ziepe.ca> References: <447A41F3-EB94-4DA4-8B98-038B127774A5@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <447A41F3-EB94-4DA4-8B98-038B127774A5@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2020 at 10:53:00PM +0100, David Hildenbrand wrote: > > When check_and_migrate_movable_pages() is called, the pages are > > already pinned. If some of those pages are in movable zone, and we > > fail to migrate or isolate them what should we do: proceed, and > > keep it as exception of when movable zone can actually have pinned > > pages or unpin all pages in the array, and return an error, or > > unpin only pages in movable zone, and return an error? > > I guess revert what we did (unpin) and return an error. The > interesting question is what can make migration/isolation fail > > a) out of memory: smells like a zone setup issue. Failures are acceptable I guess. Out of memory is reasonable.. > b) short term pinnings: process dying - not relevant I guess. Other cases? (Fork?) Concurrent with non-longterm GUP users are less reasonable, fork is not reasonable, etc.. Racing with another GUP in another thread is also not reasonable, so failing to isolate can't be a failure Jasnon