From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, Intel-gfx@lists.freedesktop.org
Cc: Tom Murphy <murphyt7@tcd.ie>,
Matthew Auld <matthew.auld@intel.com>,
Logan Gunthorpe <logang@deltatee.com>,
Lu Baolu <baolu.lu@linux.intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Fix DMA mapped scatterlist walks
Date: Wed, 9 Sep 2020 14:43:58 +0100 [thread overview]
Message-ID: <9b473e8f-b26c-21c9-52c6-5c7e676658b0@linux.intel.com> (raw)
In-Reply-To: <159965658319.2410.1208794152045447402@build.alporthouse.com>
On 09/09/2020 14:03, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2020-09-09 13:44:57)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> When walking DMA mapped scatterlists sg_dma_len has to be used since it
>> can be different (coalesced) from the backing store entry.
>>
>> This also means we have to end the walk when encountering a zero length
>> DMA entry and cannot rely on the normal sg list end marker.
>>
>> Both issues were there in theory for some time but were hidden by the fact
>> Intel IOMMU driver was never coalescing entries. As there are ongoing
>> efforts to change this we need to start handling it.
>
> Does this change anything if we were already feeding in coalesced
> entries? I doubt we made all sg generators compact the lists though.
I don't think so. My takeaway from this was a realization that page and
dma coalescing can be completely different (more so once the iommu
patches get in). I did not think of any other problems as long as the
dma remapping fits into the number of available sg table entries we
allocated. It is just a bit weird, this duality of sg_table "views".
> The change looks reasonable, it seems you have kept the dma and page
> iterators distinct, which was the only worry that occurred to me.
It surprised me we have two iterators, well one and a half. The sgt_dma
one being the half of an iterator. :)
Regards,
Tvrtko
P.S. Well as I was writing this reply full test results came in and
something is still broken, so scratch that..
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-09-09 13:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 12:44 [Intel-gfx] [PATCH] drm/i915: Fix DMA mapped scatterlist walks Tvrtko Ursulin
2020-09-09 13:03 ` Chris Wilson
2020-09-09 13:43 ` Tvrtko Ursulin [this message]
2020-09-09 13:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-09-09 14:07 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-09-09 19:29 ` [Intel-gfx] [PATCH] " Logan Gunthorpe
2020-09-10 10:27 ` Tvrtko Ursulin
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=9b473e8f-b26c-21c9-52c6-5c7e676658b0@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=baolu.lu@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=logang@deltatee.com \
--cc=matthew.auld@intel.com \
--cc=murphyt7@tcd.ie \
/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