From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: [RFC PATCH 0/4] Restore change_pte optimization to its former glory Date: Fri, 1 Feb 2019 19:14:33 -0500 Message-ID: <20190202001433.GB12463@redhat.com> References: <20190131183706.20980-1-jglisse@redhat.com> <20190201235738.GA12463@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Peter Xu , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Morton , Matthew Wilcox , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Michal Hocko , kvm@vger.kernel.org To: jglisse@redhat.com Return-path: Content-Disposition: inline In-Reply-To: <20190201235738.GA12463@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Feb 01, 2019 at 06:57:38PM -0500, Andrea Arcangeli wrote: > If it's cleared with ptep_clear_flush_notify, change_pte still won't > work. The above text needs updating with > "ptep_clear_flush". set_pte_at_notify is all about having > ptep_clear_flush only before it or it's the same as having a range > invalidate preceding it. > > With regard to the code, wp_page_copy() needs > s/ptep_clear_flush_notify/ptep_clear_flush/ before set_pte_at_notify. Oops, the above two statements were incorrect because ptep_clear_flush_notify doesn't interfere with change_pte and will only invalidate secondary MMU mappings on those secondary MMUs that shares the same pagetables with the primary MMU and that in turn won't ever implement a change_pte method.