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 42ABDC433E6 for ; Wed, 13 Jan 2021 02:18:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 188042310F for ; Wed, 13 Jan 2021 02:18:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727927AbhAMCSG (ORCPT ); Tue, 12 Jan 2021 21:18:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727904AbhAMCSE (ORCPT ); Tue, 12 Jan 2021 21:18:04 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C635C0617A3 for ; Tue, 12 Jan 2021 18:17:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=EmSAjnSYAp9xXMovzqYhVDc85JMGVHpfKia1pHTJ+EI=; b=plJ5Ka5h+hRN7qsXCo+IkoizbM 1WIqT+1XMnOZ3E6Zj5Uf/CvzDBRcA4sXIlVNIpSBmS/lJMuB1BKGfkTzAZjewq4zMG35oUjfuqKdr SdcWyDmF7zFD6IvMvAUgPAolJgax8qArixwRf1DwQ/vwHWaWA26B+5P7DpKCjJlJy7Ny2GVYKQe0l x7RY6T7LkT2/2dRMGE5ma1iZtljqMwjM+SakE4U/20LRO/BFWF+8NOJa+yRKZXtU1Nqfsi9cjO/6H x7Nh733IeD4n095VJ+0kUM23Qge30bZYAEi4VpihYrJUWwjHTthsR/HWvQU6andbXrZL9liNjFJYi GXt76XYQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1kzVhr-005g2N-49; Wed, 13 Jan 2021 02:16:23 +0000 Date: Wed, 13 Jan 2021 02:16:19 +0000 From: Matthew Wilcox To: Linus Torvalds Cc: John Hubbard , Andrea Arcangeli , Andrew Morton , Linux-MM , Linux Kernel Mailing List , Yu Zhao , Andy Lutomirski , Peter Xu , Pavel Emelyanov , Mike Kravetz , Mike Rapoport , Minchan Kim , Will Deacon , Peter Zijlstra , Hugh Dickins , "Kirill A. Shutemov" , Oleg Nesterov , Jann Horn , Kees Cook , Leon Romanovsky , Jason Gunthorpe , Jan Kara , Kirill Tkhai , Nadav Amit , Jens Axboe Subject: Re: [PATCH 0/1] mm: restore full accuracy in COW page reuse Message-ID: <20210113021619.GL35215@casper.infradead.org> References: <20210110004435.26382-1-aarcange@redhat.com> <45806a5a-65c2-67ce-fc92-dc8c2144d766@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 02:18:13PM -0800, Linus Torvalds wrote: > The whole "optimistic page references throigh page cache" etc are > complete non-issues, because the whole point is that we already know > it's not a page cache page. There is simply no other way to reach that > page than through GUP. The thing about the speculative page cache references is that they can temporarily bump a refcount on a page which _used_ to be in the page cache and has now been reallocated as some other kind of page. Now, this is obviously rare, so if it's only a performance question, it'll be fine. If there's a correctness issue with copying pages that would otherwise not have been copied, then it's a problem.