linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Hellström (VMware)" <thomas_os@shipmail.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	"Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux-MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges
Date: Mon, 30 Sep 2019 19:38:31 +0200	[thread overview]
Message-ID: <2788e6e6-6916-5f95-51f5-336b8edaee2f@shipmail.org> (raw)
In-Reply-To: <CAHk-=wigUfYXiizFH6tBCH0Na=L+c=k7CgXGoZjwKg4K1rNJ2Q@mail.gmail.com>

On 9/30/19 7:12 PM, Linus Torvalds wrote:
> On Mon, Sep 30, 2019 at 6:04 AM Kirill A. Shutemov <kirill@shutemov.name> 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 for calling that big complex
> function for every iteration step.
>
> Of course, you are right that the callback approach is problematic
> too, now that we have retpoline issues, making those very expensive.
> But at least that hopefully gets fixed some day and gets to be a rare
> problem.
>
> Matter ot taste, I guess.
>
>                Linus

Matthew Wilcox suggested something similar before the pagewalk.c rewrite:

https://lore.kernel.org/lkml/20190806190937.GD30179@bombadil.infradead.org/

Still, In this case I'd opt for using the pagewalk code: In the dirty 
helpers we don't ever use a struct page, but only deal with PTE entries, 
same as the pagewalk code does, but not page_vma_mapped_walk(). The 
underlying memory may well be IO memory.

/Thomas



  reply	other threads:[~2019-09-30 21:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 11:55 [PATCH v2 0/5] Emulated coherent graphics memory take 2 Thomas Hellström (VMware)
2019-09-26 11:55 ` [PATCH v2 1/5] mm: Add write-protect and clean utilities for address space ranges Thomas Hellström (VMware)
2019-09-26 12:03   ` Ack to merge through DRM? WAS " Thomas Hellström (VMware)
2019-09-26 19:19     ` Linus Torvalds
2019-09-26 20:09       ` Thomas Hellström (VMware)
2019-09-26 20:16         ` Linus Torvalds
2019-09-26 20:55           ` Thomas Hellström (VMware)
2019-09-26 22:20             ` Linus Torvalds
2019-09-27  5:55               ` Thomas Hellström (VMware)
2019-09-27  9:27                 ` Thomas Hellström (VMware)
2019-09-27 12:26               ` Kirill A. Shutemov
2019-09-27 12:17           ` Kirill A. Shutemov
2019-09-27 16:39             ` Linus Torvalds
2019-09-30 13:03               ` Kirill A. Shutemov
2019-09-30 17:12                 ` Linus Torvalds
2019-09-30 17:38                   ` Thomas Hellström (VMware) [this message]
2019-10-02  9:21           ` Thomas Hellström (VMware)
2019-10-02 13:18             ` Kirill A. Shutemov
2019-10-02 13:28               ` Thomas Hellström (VMware)
2019-09-26 11:55 ` [PATCH v2 2/5] drm/vmwgfx: Implement an infrastructure for write-coherent resources Thomas Hellström (VMware)
2019-09-26 11:55 ` [PATCH v2 3/5] drm/vmwgfx: Use an RBtree instead of linked list for MOB resources Thomas Hellström (VMware)
2019-09-26 11:55 ` [PATCH v2 4/5] drm/vmwgfx: Implement an infrastructure for read-coherent resources Thomas Hellström (VMware)
2019-09-26 11:55 ` [PATCH v2 5/5] drm/vmwgfx: Add surface dirty-tracking callbacks Thomas Hellström (VMware)

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=2788e6e6-6916-5f95-51f5-336b8edaee2f@shipmail.org \
    --to=thomas_os@shipmail.org \
    --cc=akpm@linux-foundation.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).