Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp750662imu; Tue, 20 Nov 2018 06:27:18 -0800 (PST) X-Google-Smtp-Source: AJdET5ccduwTt2YLzFGGCalhFvZqND7bC0TkHmvW8Rtfyp9ZNo0GiIOmmCvyzmX63RWkOohpKOEs X-Received: by 2002:a62:c42:: with SMTP id u63-v6mr2426999pfi.43.1542724038187; Tue, 20 Nov 2018 06:27:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542724038; cv=none; d=google.com; s=arc-20160816; b=1LfFx1BEk5Py2Ri84PCrsJ0xiLIqvyrG8UXV1r6dh8gLq412TXTZQOgkntdEfJW+Jw 4yYgoMFNL0FHKc2ljWOb26TPMPmNE8MpYZK7R/3+wasifZ8FyaFMtRoA9F+HeOsBFSux /F6Ib5b7emweBu6QZC2sylfvir6aoKKG+qoAZ2c/VL8iWBLD0rFmyyAPTspI1Q7nEGXZ 5WXDcnQc4c1FezW1iK+eN1GdYJL5s0CyD4Ndu87qYqhr/buppftJ5E00MbUfWxP7oxXy V4Hlgkv9+UZvbEI3Hq3oVko8CeHg/7JCHwMu3Rk2Rzf8mssxSDI+p7XZiktZdSpwkiMm AYOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0OPsyAmx3SnpmrUBh66rwKIAOqn6cuiyxJzt2xpFUog=; b=oSVvVY8XEbau3cOiP+LBDpxNt9w/IBSXr5meTYU5aUdEsjyaSQBcYMZak1v4KwYr1k 6zgt5W7im4p0PKucLYQLIAWRhwriVrYB/VciKuGnJT9hbTDHmiRyyZszukEsgkYEEazA nigXN8OrlUrdb+6p/4ahAcPAcvHealvVUkAuJOtgN2Md36LGbcZm9yXUt/1LIzTDg7Q3 T59IKcoPmZ7MTvdID9aC3+r/SobKgyNKgWwKTbFKDDS1KgsxqfQechX+7HP1ApHfNRzK 9sRQH9tt4IuKOd0NeofDu6Z3XLpQ4oyQ5x9S+0b8CsKpIP8WJZymKkXu3kMifnm2XDXl ++Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si5488134plk.206.2018.11.20.06.27.02; Tue, 20 Nov 2018 06:27:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729069AbeKUAzZ (ORCPT + 99 others); Tue, 20 Nov 2018 19:55:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:33860 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726575AbeKUAzZ (ORCPT ); Tue, 20 Nov 2018 19:55:25 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1E348AFC3; Tue, 20 Nov 2018 14:26:00 +0000 (UTC) Date: Tue, 20 Nov 2018 15:25:59 +0100 From: Michal Hocko To: "Kirill A. Shutemov" Cc: linux-mm@kvack.org, Andrew Morton , Oscar Salvador , Pavel Tatashin , David Hildenbrand , LKML Subject: Re: [RFC PATCH 3/3] mm, fault_around: do not take a reference to a locked page Message-ID: <20181120142559.GM22247@dhcp22.suse.cz> References: <20181120134323.13007-1-mhocko@kernel.org> <20181120134323.13007-4-mhocko@kernel.org> <20181120140715.mouc7okin3ht5krr@kshutemo-mobl1> <20181120141207.GK22247@dhcp22.suse.cz> <20181120141700.pwoaxatx3v5xnwos@kshutemo-mobl1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181120141700.pwoaxatx3v5xnwos@kshutemo-mobl1> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 20-11-18 17:17:00, Kirill A. Shutemov wrote: > On Tue, Nov 20, 2018 at 03:12:07PM +0100, Michal Hocko wrote: > > On Tue 20-11-18 17:07:15, Kirill A. Shutemov wrote: > > > On Tue, Nov 20, 2018 at 02:43:23PM +0100, Michal Hocko wrote: > > > > From: Michal Hocko > > > > > > > > filemap_map_pages takes a speculative reference to each page in the > > > > range before it tries to lock that page. While this is correct it > > > > also can influence page migration which will bail out when seeing > > > > an elevated reference count. The faultaround code would bail on > > > > seeing a locked page so we can pro-actively check the PageLocked > > > > bit before page_cache_get_speculative and prevent from pointless > > > > reference count churn. > > > > > > Looks fine to me. > > > > Thanks for the review. > > > > > But please drop a line of comment in the code. As is it might be confusing > > > for a reader. > > > > This? > > Yep. > > Acked-by: Kirill A. Shutemov Cool, thanks! I will wait some more time for review feedback for other patches and then repost with this folded in. -- Michal Hocko SUSE Labs