From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerome Glisse Subject: Re: [PATCH 00/13] mmu_notifier kill invalidate_page callback Date: Tue, 29 Aug 2017 20:56:15 -0400 Message-ID: <20170830005615.GA2386@redhat.com> References: <20170829235447.10050-1-jglisse@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Linus Torvalds Cc: Bernhard Held , KVM list , Radim =?utf-8?B?S3LEjW3DocWZ?= , Sudeep Dutt , DRI , linux-mm , Andrea Arcangeli , Dimitri Sivanich , "linux-rdma@vger.kernel.org" , amd-gfx@lists.freedesktop.org, xen-devel , Adam Borowski , Joerg Roedel , Jack Steiner , Dan Williams , Linux Kernel Mailing List , Ashutosh Dixit , "open list:AMD IOMMU (AMD-VI)" , Paolo Bonzini , Andrew Morton , ppc-dev , Kirill A . S List-Id: amd-gfx.lists.freedesktop.org T24gVHVlLCBBdWcgMjksIDIwMTcgYXQgMDU6MTE6MjRQTSAtMDcwMCwgTGludXMgVG9ydmFsZHMg d3JvdGU6Cj4gT24gVHVlLCBBdWcgMjksIDIwMTcgYXQgNDo1NCBQTSwgSsOpcsO0bWUgR2xpc3Nl IDxqZ2xpc3NlQHJlZGhhdC5jb20+IHdyb3RlOgo+ID4KPiA+IE5vdGUgdGhpcyBpcyBiYXJlbHkg dGVzdGVkLiBJIGludGVuZCB0byBkbyBtb3JlIHRlc3Rpbmcgb2YgbmV4dCBmZXcgZGF5cwo+ID4g YnV0IGkgZG8gbm90IGhhdmUgYWNjZXNzIHRvIGFsbCBoYXJkd2FyZSB0aGF0IG1ha2UgdXNlIG9m IHRoZSBtbXVfbm90aWZpZXIKPiA+IEFQSS4KPiAKPiBUaGFua3MgZm9yIGRvaW5nIHRoaXMuCj4g Cj4gPiBGaXJzdCAyI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bGltIG9uZSkK CkrDqXLDtG1lCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f CmRyaS1kZXZlbCBtYWlsaW5nIGxpc3QKZHJpLWRldmVsQGxpc3RzLmZyZWVkZXNrdG9wLm9yZwpo dHRwczovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2RyaS1kZXZlbAo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xhnBc35v0zDq5k for ; Wed, 30 Aug 2017 10:56:24 +1000 (AEST) Date: Tue, 29 Aug 2017 20:56:15 -0400 From: Jerome Glisse To: Linus Torvalds Cc: Bernhard Held , Adam Borowski , Linux Kernel Mailing List , linux-mm , "Kirill A . Shutemov" , Andrew Morton , Andrea Arcangeli , Joerg Roedel , Dan Williams , Sudeep Dutt , Ashutosh Dixit , Dimitri Sivanich , Jack Steiner , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , ppc-dev , DRI , amd-gfx@lists.freedesktop.org, "linux-rdma@vger.kernel.org" , "open list:AMD IOMMU (AMD-VI)" , xen-devel , KVM list Subject: Re: [PATCH 00/13] mmu_notifier kill invalidate_page callback Message-ID: <20170830005615.GA2386@redhat.com> References: <20170829235447.10050-1-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Aug 29, 2017 at 05:11:24PM -0700, Linus Torvalds wrote: > On Tue, Aug 29, 2017 at 4:54 PM, Jérôme Glisse wrote: > > > > Note this is barely tested. I intend to do more testing of next few days > > but i do not have access to all hardware that make use of the mmu_notifier > > API. > > Thanks for doing this. > > > First 2 patches convert existing call of mmu_notifier_invalidate_page() > > to mmu_notifier_invalidate_range() and bracket those call with call to > > mmu_notifier_invalidate_range_start()/end(). > > Ok, those two patches are a bit more complex than I was hoping for, > but not *too* bad. > > And the final end result certainly looks nice: > > > 16 files changed, 74 insertions(+), 214 deletions(-) > > Yeah, removing all those invalidate_page() notifiers certainly makes > for a nice patch. > > And I actually think you missed some more lines that can now be > removed: kvm_arch_mmu_notifier_invalidate_page() should no longer be > needed either, so you can remove all of those too (most of them are > empty inline functions, but x86 has one that actually does something. > > So there's an added 30 or so dead lines that should be removed in the > kvm patch, I think. Yes i missed that. I will wait for people to test and for result of my own test before reposting if need be, otherwise i will post as separate patch. > > But from a _very_ quick read-through this looks fine. But it obviously > needs testing. > > People - *especially* the people who saw issues under KVM - can you > try out Jérôme's patch-series? I aded some people to the cc, the full > series is on lkml. Jérôme - do you have a git branch for people to > test that they could easily pull and try out? https://cgit.freedesktop.org/~glisse/linux mmu-notifier branch git://people.freedesktop.org/~glisse/linux (Sorry if that tree is bit big it has a lot of dead thing i need to push a clean and slim one) Jérôme From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f200.google.com (mail-qk0-f200.google.com [209.85.220.200]) by kanga.kvack.org (Postfix) with ESMTP id 77A6D6B0494 for ; Tue, 29 Aug 2017 20:56:24 -0400 (EDT) Received: by mail-qk0-f200.google.com with SMTP id m4so14660879qke.6 for ; Tue, 29 Aug 2017 17:56:24 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id n13si3812274qtk.258.2017.08.29.17.56.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Aug 2017 17:56:23 -0700 (PDT) Date: Tue, 29 Aug 2017 20:56:15 -0400 From: Jerome Glisse Subject: Re: [PATCH 00/13] mmu_notifier kill invalidate_page callback Message-ID: <20170830005615.GA2386@redhat.com> References: <20170829235447.10050-1-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: Bernhard Held , Adam Borowski , Linux Kernel Mailing List , linux-mm , "Kirill A . Shutemov" , Andrew Morton , Andrea Arcangeli , Joerg Roedel , Dan Williams , Sudeep Dutt , Ashutosh Dixit , Dimitri Sivanich , Jack Steiner , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , ppc-dev , DRI , amd-gfx@lists.freedesktop.org, "linux-rdma@vger.kernel.org" , "open list:AMD IOMMU (AMD-VI)" , xen-devel , KVM list On Tue, Aug 29, 2017 at 05:11:24PM -0700, Linus Torvalds wrote: > On Tue, Aug 29, 2017 at 4:54 PM, Jerome Glisse wrote: > > > > Note this is barely tested. I intend to do more testing of next few days > > but i do not have access to all hardware that make use of the mmu_notifier > > API. > > Thanks for doing this. > > > First 2 patches convert existing call of mmu_notifier_invalidate_page() > > to mmu_notifier_invalidate_range() and bracket those call with call to > > mmu_notifier_invalidate_range_start()/end(). > > Ok, those two patches are a bit more complex than I was hoping for, > but not *too* bad. > > And the final end result certainly looks nice: > > > 16 files changed, 74 insertions(+), 214 deletions(-) > > Yeah, removing all those invalidate_page() notifiers certainly makes > for a nice patch. > > And I actually think you missed some more lines that can now be > removed: kvm_arch_mmu_notifier_invalidate_page() should no longer be > needed either, so you can remove all of those too (most of them are > empty inline functions, but x86 has one that actually does something. > > So there's an added 30 or so dead lines that should be removed in the > kvm patch, I think. Yes i missed that. I will wait for people to test and for result of my own test before reposting if need be, otherwise i will post as separate patch. > > But from a _very_ quick read-through this looks fine. But it obviously > needs testing. > > People - *especially* the people who saw issues under KVM - can you > try out Jerome's patch-series? I aded some people to the cc, the full > series is on lkml. Jerome - do you have a git branch for people to > test that they could easily pull and try out? https://cgit.freedesktop.org/~glisse/linux mmu-notifier branch git://people.freedesktop.org/~glisse/linux (Sorry if that tree is bit big it has a lot of dead thing i need to push a clean and slim one) Jerome -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org