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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 4682FC433DB for ; Tue, 19 Jan 2021 18:54:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C5359216FD for ; Tue, 19 Jan 2021 18:54:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5359216FD 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 E3C6B6B0032; Tue, 19 Jan 2021 13:22:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E136C6B0033; Tue, 19 Jan 2021 13:22:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D4F756B0036; Tue, 19 Jan 2021 13:22:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0215.hostedemail.com [216.40.44.215]) by kanga.kvack.org (Postfix) with ESMTP id BFBC26B0032 for ; Tue, 19 Jan 2021 13:22:06 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5A2BE364D for ; Tue, 19 Jan 2021 18:22:06 +0000 (UTC) X-FDA: 77723343852.02.frame74_4101e0827554 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id 317A510097AA0 for ; Tue, 19 Jan 2021 18:22:06 +0000 (UTC) X-HE-Tag: frame74_4101e0827554 X-Filterd-Recvd-Size: 4366 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Tue, 19 Jan 2021 18:22:02 +0000 (UTC) Received: by mail-qt1-f179.google.com with SMTP id d15so8970868qtw.12 for ; Tue, 19 Jan 2021 10:22:02 -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=QB+qlyJrpIAY9PAVjnSSlEibl/VpzXPECBF8avvNf9g=; b=ZpCwWJLwCV0bgOoVL6z7GNeJGgm4Ux+Pn0E59lHo+mYjHp2i9ibyDroLAo18CedooT kFWXI2RiwNofDz7OzfpMir+6mOPzVoHJJk5PdgdsJ5ei66lQrPeyFvwv+QcS3UNtCO0t 2RFP05K/6+STlM5/b8Io3A+L3xuYA3g5q+gZAcQaSSDYMULQdlR85NzMPmd8ACUgE7RM qsH98a4Sx8cX+CQpht1G3I6dzGiflHirrC61n6MhKJhhRwsk7UNDQ6DHfb7k8P9K/v3+ /KuKoV7IcO2i9d+7lQ8fiZxcxncF9vukjcoB36n4Z31WWTU9gMtM5Y295JWeXSWruOUx ic0Q== 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=QB+qlyJrpIAY9PAVjnSSlEibl/VpzXPECBF8avvNf9g=; b=FTNH8SVH++LHwHrnUsocpy+WRZr67qgffDkrwmWaO6SALapjyk9+BR//fjgGsRekfQ STa+ftvQL8nv2bUoEuLcZf8Ehwq38lX3Uk9qNEVKC+2WOAlxZ3M06hfZK+Qkq3rKXS7L zRq2sbt/vI/Jjpu8v3lTge8iDSEZMSVXOkj2RFI7YGrZmoTO64Uuy1D327E/k7b7telf /JvENrstnRGShPEwmPhnO4a36apuEwmfZl5FXVYeedyOjWDAlLFjgy+kq4KthV8z69nJ nR0p2qc/Tyx1FbzajbFiW/lidSiW7WIAzMrp2PjX8uVzUJHVkgng2FfEvxvsNtLRilOC XYyw== X-Gm-Message-State: AOAM533ECKinhTKsa0G/8460neu+y4ploA+dZzEaS6STNZI4BywdmQvP R40LuWxOKwmteyhvg4xvSon7gA== X-Google-Smtp-Source: ABdhPJz2ZDCDvyVyZdPuux/jcDhvN+advwUUSodu2d8iZEb7w0r1BPV9yWMXcNjrYJ+DwwIBy9Vyyg== X-Received: by 2002:ac8:7394:: with SMTP id t20mr5567220qtp.72.1611080521652; Tue, 19 Jan 2021 10:22:01 -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 i3sm12711419qtd.95.2021.01.19.10.22.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 10:22:01 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1l1vdg-003pV4-Mu; Tue, 19 Jan 2021 14:22:00 -0400 Date: Tue, 19 Jan 2021 14:22:00 -0400 From: Jason Gunthorpe To: Pavel Tatashin Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, mhocko@suse.com, david@redhat.com, osalvador@suse.de, dan.j.williams@intel.com, sashal@kernel.org, tyhicks@linux.microsoft.com, iamjoonsoo.kim@lge.com, mike.kravetz@oracle.com, rostedt@goodmis.org, mingo@redhat.com, peterz@infradead.org, mgorman@suse.de, willy@infradead.org, rientjes@google.com, jhubbard@nvidia.com, linux-doc@vger.kernel.org, ira.weiny@intel.com, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v5 04/14] mm/gup: check for isolation errors Message-ID: <20210119182200.GZ4605@ziepe.ca> References: <20210119043920.155044-1-pasha.tatashin@soleen.com> <20210119043920.155044-5-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210119043920.155044-5-pasha.tatashin@soleen.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 Mon, Jan 18, 2021 at 11:39:10PM -0500, Pavel Tatashin wrote: > It is still possible that we pin movable CMA pages if there are isolation > errors and cma_page_list stays empty when we check again. > > Check for isolation errors, and return success only when there are no > isolation errors, and cma_page_list is empty after checking. > > Because isolation errors are transient, we retry indefinitely. > > Signed-off-by: Pavel Tatashin > --- > mm/gup.c | 60 ++++++++++++++++++++++++++++++++------------------------ > 1 file changed, 34 insertions(+), 26 deletions(-) This should have a fixme too, this is a bug. The patch looks OK, but I keep feeling this logic is all really overcomplicated... Reviewed-by: Jason Gunthorpe Jason