From: Jerome Glisse <jglisse@redhat.com> To: Mike Rapoport <rppt@linux.ibm.com> Cc: linux-mm@kvack.org, "Andrew Morton" <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, "Matthew Wilcox" <mawilcox@microsoft.com>, "Ross Zwisler" <zwisler@kernel.org>, "Jan Kara" <jack@suse.cz>, "Dan Williams" <dan.j.williams@intel.com>, "Paolo Bonzini" <pbonzini@redhat.com>, "Radim Krčmář" <rkrcmar@redhat.com>, "Michal Hocko" <mhocko@kernel.org>, "Christian Koenig" <christian.koenig@amd.com>, "Felix Kuehling" <felix.kuehling@amd.com>, "Ralph Campbell" <rcampbell@nvidia.com>, "John Hubbard" <jhubbard@nvidia.com>, kvm@vger.kernel.org, linux-rdma@vger.kernel.org, linux-fsdevel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 3/3] mm/mmu_notifier: contextual information for event triggering invalidation Date: Tue, 4 Dec 2018 09:48:55 -0500 [thread overview] Message-ID: <20181204144854.GB3917@redhat.com> (raw) In-Reply-To: <20181204081746.GJ26700@rapoport-lnx> On Tue, Dec 04, 2018 at 10:17:48AM +0200, Mike Rapoport wrote: > On Mon, Dec 03, 2018 at 03:18:17PM -0500, jglisse@redhat.com wrote: > > From: Jérôme Glisse <jglisse@redhat.com> [...] > > diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h > > index cbeece8e47d4..3077d487be8b 100644 > > --- a/include/linux/mmu_notifier.h > > +++ b/include/linux/mmu_notifier.h > > @@ -25,10 +25,43 @@ struct mmu_notifier_mm { > > spinlock_t lock; > > }; > > > > +/* > > + * What event is triggering the invalidation: > > Can you please make it kernel-doc comment? Sorry should have done that in the first place, Andrew i will post a v2 with that and fixing my one stupid bug. > > + * > > + * MMU_NOTIFY_UNMAP > > + * either munmap() that unmap the range or a mremap() that move the range > > + * > > + * MMU_NOTIFY_CLEAR > > + * clear page table entry (many reasons for this like madvise() or replacing > > + * a page by another one, ...). > > + * > > + * MMU_NOTIFY_PROTECTION_VMA > > + * update is due to protection change for the range ie using the vma access > > + * permission (vm_page_prot) to update the whole range is enough no need to > > + * inspect changes to the CPU page table (mprotect() syscall) > > + * > > + * MMU_NOTIFY_PROTECTION_PAGE > > + * update is due to change in read/write flag for pages in the range so to > > + * mirror those changes the user must inspect the CPU page table (from the > > + * end callback). > > + * > > + * > > + * MMU_NOTIFY_SOFT_DIRTY > > + * soft dirty accounting (still same page and same access flags) > > + */ > > +enum mmu_notifier_event { > > + MMU_NOTIFY_UNMAP = 0, > > + MMU_NOTIFY_CLEAR, > > + MMU_NOTIFY_PROTECTION_VMA, > > + MMU_NOTIFY_PROTECTION_PAGE, > > + MMU_NOTIFY_SOFT_DIRTY, > > +};
WARNING: multiple messages have this Message-ID (diff)
From: Jerome Glisse <jglisse@redhat.com> To: Mike Rapoport <rppt@linux.ibm.com> Cc: linux-mm@kvack.org, "Andrew Morton" <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, "Matthew Wilcox" <mawilcox@microsoft.com>, "Ross Zwisler" <zwisler@kernel.org>, "Jan Kara" <jack@suse.cz>, "Dan Williams" <dan.j.williams@intel.com>, "Paolo Bonzini" <pbonzini@redhat.com>, "Radim Krčmář" <rkrcmar@redhat.com>, "Michal Hocko" <mhocko@kernel.org>, "Christian Koenig" <christian.koenig@amd.com>, "Felix Kuehling" <felix.kuehling@amd.com>, "Ralph Campbell" <rcampbell@nvidia.com>, "John Hubbard" <jhubbard@nvidia.com>, kvm@vger.kernel.org, linux-rdma@vger.kernel.org, linux-fsdevel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 3/3] mm/mmu_notifier: contextual information for event triggering invalidation Date: Tue, 4 Dec 2018 09:48:55 -0500 [thread overview] Message-ID: <20181204144854.GB3917@redhat.com> (raw) In-Reply-To: <20181204081746.GJ26700@rapoport-lnx> On Tue, Dec 04, 2018 at 10:17:48AM +0200, Mike Rapoport wrote: > On Mon, Dec 03, 2018 at 03:18:17PM -0500, jglisse@redhat.com wrote: > > From: J�r�me Glisse <jglisse@redhat.com> [...] > > diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h > > index cbeece8e47d4..3077d487be8b 100644 > > --- a/include/linux/mmu_notifier.h > > +++ b/include/linux/mmu_notifier.h > > @@ -25,10 +25,43 @@ struct mmu_notifier_mm { > > spinlock_t lock; > > }; > > > > +/* > > + * What event is triggering the invalidation: > > Can you please make it kernel-doc comment? Sorry should have done that in the first place, Andrew i will post a v2 with that and fixing my one stupid bug. > > + * > > + * MMU_NOTIFY_UNMAP > > + * either munmap() that unmap the range or a mremap() that move the range > > + * > > + * MMU_NOTIFY_CLEAR > > + * clear page table entry (many reasons for this like madvise() or replacing > > + * a page by another one, ...). > > + * > > + * MMU_NOTIFY_PROTECTION_VMA > > + * update is due to protection change for the range ie using the vma access > > + * permission (vm_page_prot) to update the whole range is enough no need to > > + * inspect changes to the CPU page table (mprotect() syscall) > > + * > > + * MMU_NOTIFY_PROTECTION_PAGE > > + * update is due to change in read/write flag for pages in the range so to > > + * mirror those changes the user must inspect the CPU page table (from the > > + * end callback). > > + * > > + * > > + * MMU_NOTIFY_SOFT_DIRTY > > + * soft dirty accounting (still same page and same access flags) > > + */ > > +enum mmu_notifier_event { > > + MMU_NOTIFY_UNMAP = 0, > > + MMU_NOTIFY_CLEAR, > > + MMU_NOTIFY_PROTECTION_VMA, > > + MMU_NOTIFY_PROTECTION_PAGE, > > + MMU_NOTIFY_SOFT_DIRTY, > > +};
next prev parent reply other threads:[~2018-12-04 14:48 UTC|newest] Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-03 20:18 [PATCH 0/3] mmu notifier contextual informations jglisse 2018-12-03 20:18 ` jglisse 2018-12-03 20:18 ` [PATCH 1/3] mm/mmu_notifier: use structure for invalidate_range_start/end callback jglisse 2018-12-03 20:18 ` [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls jglisse 2018-12-03 20:18 ` jglisse 2018-12-04 0:09 ` Jerome Glisse 2018-12-04 0:09 ` Jerome Glisse 2018-12-05 11:04 ` Jan Kara 2018-12-05 11:04 ` Jan Kara 2018-12-05 11:04 ` Jan Kara 2018-12-05 15:53 ` Jerome Glisse 2018-12-05 15:53 ` Jerome Glisse 2018-12-05 16:28 ` Jan Kara 2018-12-05 16:28 ` Jan Kara 2018-12-05 16:28 ` Jan Kara 2018-12-06 20:31 ` kbuild test robot 2018-12-06 20:31 ` kbuild test robot 2018-12-06 20:31 ` kbuild test robot 2018-12-06 20:31 ` kbuild test robot 2018-12-06 20:31 ` kbuild test robot 2018-12-06 20:35 ` kbuild test robot 2018-12-06 20:35 ` kbuild test robot 2018-12-06 20:35 ` kbuild test robot 2018-12-06 20:35 ` kbuild test robot 2018-12-03 20:18 ` [PATCH 3/3] mm/mmu_notifier: contextual information for event triggering invalidation jglisse 2018-12-04 8:17 ` Mike Rapoport 2018-12-04 14:48 ` Jerome Glisse [this message] 2018-12-04 14:48 ` Jerome Glisse 2018-12-04 23:21 ` Andrew Morton 2018-12-06 20:53 ` kbuild test robot 2018-12-06 20:53 ` kbuild test robot 2018-12-06 20:53 ` kbuild test robot 2018-12-06 20:53 ` kbuild test robot 2018-12-06 20:53 ` kbuild test robot 2018-12-06 21:19 ` kbuild test robot 2018-12-06 21:19 ` kbuild test robot 2018-12-06 21:19 ` kbuild test robot 2018-12-06 21:19 ` kbuild test robot 2018-12-06 21:19 ` kbuild test robot 2018-12-06 21:51 ` Jerome Glisse 2018-12-06 21:51 ` Jerome Glisse 2018-12-06 21:51 ` Jerome Glisse 2018-12-06 21:51 ` Jerome Glisse 2018-12-04 7:35 ` [PATCH 0/3] mmu notifier contextual informations Koenig, Christian 2018-12-04 7:35 ` Koenig, Christian
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20181204144854.GB3917@redhat.com \ --to=jglisse@redhat.com \ --cc=akpm@linux-foundation.org \ --cc=christian.koenig@amd.com \ --cc=dan.j.williams@intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=felix.kuehling@amd.com \ --cc=jack@suse.cz \ --cc=jhubbard@nvidia.com \ --cc=kvm@vger.kernel.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-rdma@vger.kernel.org \ --cc=mawilcox@microsoft.com \ --cc=mhocko@kernel.org \ --cc=pbonzini@redhat.com \ --cc=rcampbell@nvidia.com \ --cc=rkrcmar@redhat.com \ --cc=rppt@linux.ibm.com \ --cc=zwisler@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.