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 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 2D3FBC433FE for ; Fri, 11 Dec 2020 23:50:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A2CC8233A2 for ; Fri, 11 Dec 2020 23:50:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2CC8233A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C124E6B0036; Fri, 11 Dec 2020 18:50:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BC3506B005C; Fri, 11 Dec 2020 18:50:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A62596B005D; Fri, 11 Dec 2020 18:50:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id 8ECDB6B0036 for ; Fri, 11 Dec 2020 18:50:08 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 53267483C for ; Fri, 11 Dec 2020 23:50:08 +0000 (UTC) X-FDA: 77582647296.08.shake22_050b3f227405 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 3892D1819E624 for ; Fri, 11 Dec 2020 23:50:08 +0000 (UTC) X-HE-Tag: shake22_050b3f227405 X-Filterd-Recvd-Size: 4880 Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Fri, 11 Dec 2020 23:50:07 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id d14so9569377qkc.13 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=a7IxWFY/GW6wvixsE3sBSDmjdtuDJztYBo7VdmvQBsVp/h/cm2rUNk/xRBju6GMkoP czcRpuOa7V2RJJvQCBinIfasH/Z3CrtbzLn/i/oRAAtWmZZKDpHeyDGN2A4wao7SHpMw /EhS6fhp+cyV21GkCF8OMsWMJgd+LhUB+GvehX93ZVenQWar1ICizESYAXydsmIEvxKy +qnk+9emvyUnQQxXlsh4wut8tlFMYxTUXgVaZ/qgvs52cBiIoGZ8dOGMdXZBOFdlfZhg Pnyg/8LahCCnn4WHBFvJ6P2auruO/jUQ6yHAlSISfChDzpdTkhy+l/FNzNoOhanDy+fV Ra6g== X-Gm-Message-State: AOAM532jY58/oWp6CVY7vxrU/nmYwA9tvzp8+qjKxvbmg4d7trfarIR5 eLRh7NHtNCfIrCRmdoGOmLjB7g== X-Google-Smtp-Source: ABdhPJwRik/cgYcUX4O4YYOW6YknrDcIWCPIuQc0ZZLz/iLsSfNxZJmy3774/8jUzLnYsn9Z5QZpag== 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> 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 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