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,DKIMWL_WL_HIGH, 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 4C342C433FE for ; Sat, 12 Dec 2020 07:29:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B291223437 for ; Sat, 12 Dec 2020 07:29:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B291223437 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9B0636B0036; Sat, 12 Dec 2020 02:29:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9392B6B005C; Sat, 12 Dec 2020 02:29:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D90D6B005D; Sat, 12 Dec 2020 02:29:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 631856B0036 for ; Sat, 12 Dec 2020 02:29:18 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1EA941E19 for ; Sat, 12 Dec 2020 07:29:18 +0000 (UTC) X-FDA: 77583804396.10.lift00_0403bc927407 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id EB92216A0D2 for ; Sat, 12 Dec 2020 07:29:17 +0000 (UTC) X-HE-Tag: lift00_0403bc927407 X-Filterd-Recvd-Size: 5885 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Sat, 12 Dec 2020 07:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607758156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zngLHN+G7x7PXmJF1SeSsp3LgZXJ+vXRHI29j+4QZYU=; b=PHBpKpoQnQXAKTkfmVEy+cLxVSI1RbUMYoHCszASsS7jxc6KWTYA3kT55GHbvEpEfK6isZ YtsbkWgPx546n2RaBS/gzB7OVA8XNR4Qf244LDObGyETtiWRAkduVxIQGpWI+epeEIx96e BIqiqEWCFk56lO0qS234KeBS003CuFE= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-242-73yme2nLMR6wHXIkGAGoRw-1; Sat, 12 Dec 2020 02:29:14 -0500 X-MC-Unique: 73yme2nLMR6wHXIkGAGoRw-1 Received: by mail-ed1-f71.google.com with SMTP id d12so5111655edx.23 for ; Fri, 11 Dec 2020 23:29:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=GsbWo8MzI5/BHYS/EaqKM/Ulw99yLlb1bIOuQBeR1lk=; b=QE/ptnbR+tUGQt3DvrEcudojY84E0QbIAkcYnZ0DUfEm7e8xR2cFDQ35HjY+kRmani bnt8QBQrvyglreWoa/skhbbl8T6qXryZ+dq33aUw5ne5OW5C8vRwXcK7MtQ8FpIKJksM 5ZTK432ZTOAqTLX+fO700V8bLA/8Mf5K6qRsuO0XQjoNOCFI2BjRYsSoEuy8cNsOtIG8 WiyYVGI/1RuDKhH04SCh0s1BFAdGAR2aL2HbwenhDZ7AfBDSKC+fc0FWKCZst0y6lPxo nZS/GPL0oltjOmnsWoTPV4Am7gWcknBu3A29JEawbHp27l5bHEPELlJjRFRg5rOgafgi db5g== X-Gm-Message-State: AOAM530mZWl+HfKi1MDWOx0alTUicpnesrM7cHlt5IockO1z8patCtHk hvFD9goJ7ZOiSXjGGoJB8yHNoVUw+K4fnGcCJD2dxJOR9MDwqGbKcYUjpTs8fMpAczFik3IyzQq RdrhrhXekFJY= X-Received: by 2002:a50:e78b:: with SMTP id b11mr15358818edn.165.1607758153439; Fri, 11 Dec 2020 23:29:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRL2Y1wyHXCG127r7zUT1/Oc/JcsKsqWphtjYAyN0whGHFHSKjen6fYKNLk/25u0gYQBpDQA== X-Received: by 2002:a50:e78b:: with SMTP id b11mr15358792edn.165.1607758153223; Fri, 11 Dec 2020 23:29:13 -0800 (PST) Received: from [192.168.3.114] (p4ff23bda.dip0.t-ipconnect.de. [79.242.59.218]) by smtp.gmail.com with ESMTPSA id k21sm8459922ejv.80.2020.12.11.23.29.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Dec 2020 23:29:12 -0800 (PST) From: David Hildenbrand Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v3 5/6] mm/gup: migrate pinned pages out of movable zone Date: Sat, 12 Dec 2020 08:29:11 +0100 Message-Id: <2D10D596-3159-483C-81B4-CD187806ED46@redhat.com> References: <20201211235005.GE5487@ziepe.ca> Cc: David Hildenbrand , 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 In-Reply-To: <20201211235005.GE5487@ziepe.ca> To: Jason Gunthorpe X-Mailer: iPhone Mail (18B92) Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: > Am 12.12.2020 um 00:50 schrieb Jason Gunthorpe : >=20 > =EF=BB=BFOn Fri, Dec 11, 2020 at 10:53:00PM +0100, David Hildenbrand wrot= e: >=20 >>> 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? >>=20 >> I guess revert what we did (unpin) and return an error. The >> interesting question is what can make migration/isolation fail >>=20 >> a) out of memory: smells like a zone setup issue. Failures are acceptabl= e I guess. >=20 > Out of memory is reasonable.. >=20 >> b) short term pinnings: process dying - not relevant I guess. Other case= s? (Fork?) >=20 > Concurrent with non-longterm GUP users are less reasonable, fork is > not reasonable, etc.. Concurrent alloc_contig_range(), memory offlining, compaction .. where we m= igrate pages? Any experts on racing page migration in these scenarios? (Also wondering what would happen if we are just about to swap) >=20 > Racing with another GUP in another thread is also not reasonable, so > failing to isolate can't be a failure Having VMs with multiple vfio containers is certainly realistic, and optimi= zing in user space to do vfio mappings concurrently doesn=E2=80=98t sound t= oo crazy to me. But I haven=E2=80=98t checked if vfio common code already h= andles such concurrency. >=20 > Jasnon >=20