Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp48661pxb; Tue, 12 Jan 2021 19:40:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdxbuZiJTIv7doHzxZdQ0rcIXHAq7U9kJIwV1TrAa4jsDlOI6SggIH0TPw6+CYzun/lv+3 X-Received: by 2002:a17:906:c7d9:: with SMTP id dc25mr112664ejb.138.1610509237689; Tue, 12 Jan 2021 19:40:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610509237; cv=none; d=google.com; s=arc-20160816; b=T5N9eK1Ch42q/QgXXcrt1Y2UPNrw34Cz6v307dXajlH3UPBnDwmf0G7jhehnQQWWq0 JpuOs457nFTwN4wBrAi99BR6VarusyHwq8PFmU/FHtmuNqU0+Xx+d+1JIMjZCVoN86in XluaStQs1Lx9YV5aSl0NPNhm5Rweu38sSP5RRxL0J2qYwiODkroWshm/HOCIZZvCvkbm 1NRNz3KflJWXnLxveD8tU3OOZ9jwuRgBvMmicRlsh2/0wyE6mm/VJ/WQKGPASr3oRbo3 OBs30fe7Y371OX3+HQG7C8gyIBle+lUAPXSP+UUTGg1QsIY/tbrXSDWR1egWbWQqkgQS lqKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EmSAjnSYAp9xXMovzqYhVDc85JMGVHpfKia1pHTJ+EI=; b=RbM+WR7ug+7awzMDNY+A1GVm/1aniRW39lJWjfFrrOOlLrJ68nz/GsvDvLVkmw+38m wIrYS5DZ4l6p0nLAXr6Jl7a5RBUBcY84lBsyyp8UTEpm98AmgX1jtYXSiqBcyXHN4vEl w/gsZeksZSoQt7wj7pA9/fzqFU04D0WLkkn/K1d/6zt/heTKNCkuVPYDJ28UExbsnWsM Bq0XfYbhamhx6AW8hEPTuw+/QSR8tJzedSxfBlDe47vFaXHu+Fw0lU7a5uuapRP+2hhD nuZ4pRe3yw2KRrbwU8gfPvtgAbcx7zXHi6xyRMQVDsID76OtFqAOvIeR5JeSfUkmXqjb SNKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=plJ5Ka5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id op4si321336ejb.545.2021.01.12.19.40.14; Tue, 12 Jan 2021 19:40:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=plJ5Ka5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727921AbhAMCSF (ORCPT + 99 others); Tue, 12 Jan 2021 21:18:05 -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.