Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-10-02 Thread VMware
On 10/2/19 3:18 PM, Kirill A. Shutemov wrote: On Wed, Oct 02, 2019 at 11:21:01AM +0200, Thomas Hellström (VMware) wrote: On 9/26/19 10:16 PM, Linus Torvalds wrote: On Thu, Sep 26, 2019 at 1:09 PM Thomas Hellström (VMware) wrote: That said, if people are OK with me modifying the assert in pud_

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-10-02 Thread Kirill A. Shutemov
On Wed, Oct 02, 2019 at 11:21:01AM +0200, Thomas Hellström (VMware) wrote: > On 9/26/19 10:16 PM, Linus Torvalds wrote: > > On Thu, Sep 26, 2019 at 1:09 PM Thomas Hellström (VMware) > > wrote: > > > That said, if people are OK with me modifying the assert in > > > pud_trans_huge_lock() and make __

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-10-02 Thread VMware
On 9/26/19 10:16 PM, Linus Torvalds wrote: On Thu, Sep 26, 2019 at 1:09 PM Thomas Hellström (VMware) wrote: That said, if people are OK with me modifying the assert in pud_trans_huge_lock() and make __walk_page_range non-static, it should probably be possible to make it work, yes. I don't thin

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-30 Thread VMware
On 9/30/19 7:12 PM, Linus Torvalds wrote: On Mon, Sep 30, 2019 at 6:04 AM Kirill A. Shutemov wrote: Have you seen page_vma_mapped_walk()? I made it specifically for rmap code to cover cases when a THP is mapped with PTEs. To me it's not a big stretch to make it cover multiple pages too. I agre

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-30 Thread Linus Torvalds
On Mon, Sep 30, 2019 at 6:04 AM Kirill A. Shutemov wrote: > > Have you seen page_vma_mapped_walk()? I made it specifically for rmap code > to cover cases when a THP is mapped with PTEs. To me it's not a big > stretch to make it cover multiple pages too. I agree that is closer, but it does make fo

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-30 Thread Kirill A. Shutemov
On Fri, Sep 27, 2019 at 09:39:48AM -0700, Linus Torvalds wrote: > On Fri, Sep 27, 2019 at 5:17 AM Kirill A. Shutemov > wrote: > > > > > Call it "walk_page_mapping()". And talk extensively about how the > > > locking differs a lot from the usual "walk_page_vma()" things. > > > > Walking mappings o

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-27 Thread Linus Torvalds
On Fri, Sep 27, 2019 at 5:17 AM Kirill A. Shutemov wrote: > > > Call it "walk_page_mapping()". And talk extensively about how the > > locking differs a lot from the usual "walk_page_vma()" things. > > Walking mappings of a page is what rmap does. This code thas to be > integrated there. Well, tha

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-27 Thread Kirill A. Shutemov
On Thu, Sep 26, 2019 at 03:20:42PM -0700, Linus Torvalds wrote: > On Thu, Sep 26, 2019 at 1:55 PM Thomas Hellström (VMware) > wrote: > > > > Well, we're working on supporting huge puds and pmds in the graphics > > VMAs, although in the write-notify cases we're looking at here, we would > > probabl

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-27 Thread Kirill A. Shutemov
On Thu, Sep 26, 2019 at 01:16:55PM -0700, Linus Torvalds wrote: > On Thu, Sep 26, 2019 at 1:09 PM Thomas Hellström (VMware) > wrote: > > > > That said, if people are OK with me modifying the assert in > > pud_trans_huge_lock() and make __walk_page_range non-static, it should > > probably be possib

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-27 Thread VMware
On 9/27/19 7:55 AM, Thomas Hellström (VMware) wrote: On 9/27/19 12:20 AM, Linus Torvalds wrote: On Thu, Sep 26, 2019 at 1:55 PM Thomas Hellström (VMware) wrote: Well, we're working on supporting huge puds and pmds in the graphics VMAs, although in the write-notify cases we're looking at here,

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-26 Thread VMware
On 9/27/19 12:20 AM, Linus Torvalds wrote: On Thu, Sep 26, 2019 at 1:55 PM Thomas Hellström (VMware) wrote: Well, we're working on supporting huge puds and pmds in the graphics VMAs, although in the write-notify cases we're looking at here, we would probably want to split them down to PTE level

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-26 Thread Linus Torvalds
On Thu, Sep 26, 2019 at 1:55 PM Thomas Hellström (VMware) wrote: > > Well, we're working on supporting huge puds and pmds in the graphics > VMAs, although in the write-notify cases we're looking at here, we would > probably want to split them down to PTE level. Well, that's what the existing walk

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-26 Thread VMware
On 9/26/19 10:16 PM, Linus Torvalds wrote: On Thu, Sep 26, 2019 at 1:09 PM Thomas Hellström (VMware) wrote: That said, if people are OK with me modifying the assert in pud_trans_huge_lock() and make __walk_page_range non-static, it should probably be possible to make it work, yes. I don't thin

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-26 Thread Linus Torvalds
On Thu, Sep 26, 2019 at 1:09 PM Thomas Hellström (VMware) wrote: > > That said, if people are OK with me modifying the assert in > pud_trans_huge_lock() and make __walk_page_range non-static, it should > probably be possible to make it work, yes. I don't think you need to modify that assert at al

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-26 Thread VMware
Hi, On 9/26/19 9:19 PM, Linus Torvalds wrote: On Thu, Sep 26, 2019 at 5:03 AM Thomas Hellström (VMware) wrote: I wonder if I can get an ack from an mm maintainer to merge this through DRM along with the vmwgfx patches? Andrew? Matthew? It would have helped to actually point to the patch itsel

Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-26 Thread Linus Torvalds
On Thu, Sep 26, 2019 at 5:03 AM Thomas Hellström (VMware) wrote: > > I wonder if I can get an ack from an mm maintainer to merge this through > DRM along with the vmwgfx patches? Andrew? Matthew? It would have helped to actually point to the patch itself, instead of just quoting the commit messag

Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-26 Thread VMware
On 9/26/19 1:55 PM, Thomas Hellström (VMware) wrote: From: Thomas Hellstrom Add two utilities to a) write-protect and b) clean all ptes pointing into a range of an address space. The utilities are intended to aid in tracking dirty pages (either driver-allocated system memory or pci device memor

[PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges

2019-09-26 Thread VMware
From: Thomas Hellstrom Add two utilities to a) write-protect and b) clean all ptes pointing into a range of an address space. The utilities are intended to aid in tracking dirty pages (either driver-allocated system memory or pci device memory). The write-protect utility should be used in conjunc