linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Christoph Hellwig <hch@infradead.org>
Cc: Oleksandr Andrushchenko <andr2000@gmail.com>,
	Juergen Gross <jgross@suse.com>,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com
Subject: Re: [PATCH] drm/xen-front: Make shmem backed display buffer coherent
Date: Thu, 20 Dec 2018 19:29:37 +0100	[thread overview]
Message-ID: <CAKMK7uF8hmO=z4jy+1b1z5ELLWpjcZpqmLoRiP2BJvwnNpOFeg@mail.gmail.com> (raw)
In-Reply-To: <20181220173950.GA19641@infradead.org>

On Thu, Dec 20, 2018 at 6:39 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Thu, Dec 20, 2018 at 05:49:39PM +0200, Oleksandr Andrushchenko wrote:
> > This is the only patch [1], no series. And at the moment I think
> > there is nothing to review as I am not sure how to deal with those
> > shmem pages: this patch is rather to start a discussion on how shmem
> > pages can be flushed on ARM (the only workaround I have so far is
> > in this patch which uses DMA API). This is where I am looking for
> > some advice, so I can implement the patch the right way.
>
> shmem is basically page cache.  So you need to use the DMA streaming
> API (dma_map_*) to map it for DMA.  You need to make sure no one
> access the kernel mapping at the same time as you do DMA to it,
> so the pages should be locked.  This is how the normal file system
> I/O path works.

I wasn't around back then, but afaiui drm uses shmem because that was
the only way mm folks let us have swappable memory. We proposed a
gemfs a while ago to be able to mix up our own allocator with that,
wasn't approved.

What we most definitely not want to end up with though is actually
streaming dma, because with that all the zero copy buffer sharing
tricks become pointless. There's pretty epic amounts of hacks to work
around this, I have no idea what's supposed to give here.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2018-12-20 18:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 10:32 [PATCH] drm/xen-front: Make shmem backed display buffer coherent Oleksandr Andrushchenko
2018-12-13 10:17 ` Oleksandr Andrushchenko
2018-12-13 15:48   ` Daniel Vetter
2018-12-14  7:09     ` Oleksandr Andrushchenko
2018-12-14  8:35       ` Daniel Vetter
2018-12-17  8:03         ` Oleksandr Andrushchenko
2018-12-18 19:20 ` Noralf Trønnes
2018-12-19  8:18   ` Oleksandr Andrushchenko
2018-12-19 13:14     ` Gerd Hoffmann
2018-12-19 13:21       ` Oleksandr Andrushchenko
2018-12-19 14:10         ` Gerd Hoffmann
2018-12-20 11:19           ` Oleksandr Andrushchenko
2018-12-20 15:37       ` Christoph Hellwig
2018-12-19 16:14     ` Noralf Trønnes
2018-12-20 11:24       ` Oleksandr Andrushchenko
2018-12-20 15:36   ` Christoph Hellwig
2018-12-20 15:49     ` Oleksandr Andrushchenko
2018-12-20 17:39       ` Christoph Hellwig
2018-12-20 18:29         ` Daniel Vetter [this message]
2018-12-20 18:33           ` Christoph Hellwig
2018-12-20 18:35             ` Daniel Vetter
2018-12-20 18:38               ` Christoph Hellwig
2018-12-21  9:16                 ` Oleksandr Andrushchenko

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='CAKMK7uF8hmO=z4jy+1b1z5ELLWpjcZpqmLoRiP2BJvwnNpOFeg@mail.gmail.com' \
    --to=daniel@ffwll.ch \
    --cc=andr2000@gmail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@infradead.org \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=xen-devel@lists.xenproject.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).