Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1359063
| From | Mark Rutland <mark.rutland@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Revert "arm64: Increase the max granular size" |
| Date | 2016-03-16 16:00 +0100 |
| Message-ID | <rdl5w-1RC-9@gated-at.bofh.it> (permalink) |
| References | <rdgpb-7eq-1@gated-at.bofh.it> <rdgyS-7xF-19@gated-at.bofh.it> <rdjn4-Vw-21@gated-at.bofh.it> <rdkj9-1yw-37@gated-at.bofh.it> <rdkM9-1Kx-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Mar 16, 2016 at 02:35:35PM +0000, Will Deacon wrote: > On Wed, Mar 16, 2016 at 02:03:35PM +0000, Mark Rutland wrote: > > If I understand correctly, the main reason that we need this for correctness is > > non-coherent DMA to/from SLAB caches. > > > > A more general approach (and more invasive, but perhaps less so than making > > ARCH_DMA_MINALIGN usage completely dynamic) would be to determine at runtime > > whether the CWG is larger than the configured ARCH_DMA_MINALIGN, and if so, > > force the use of bounce buffers (which could be padded to the architectural > > maximum of 2K) for non-coherent DMA. That nicely degrades to not mattering for > > the case of coherent DMA. > > > > I would consider NoSnoop a separate case. It's closer to "negatively coherent", > > and always required page-aligned buffer anyway due to MMU behaviour. > > What makes you say that? There are no such alignment requirements for > buffers that may be accessed with a NoSnoop transaction. On ARM, we'll > have a mismatched alias, but we'd need to solve that with explicit > cache maintenance (and my understanding is that's what things like GPU > drivers already do on x86). I was under the impression that NoSnoop transactions were permitted to be Cacheable, even if non-snooping (e.g. allowing them to allocate and hit in a system cache). If that is permitted, then data corruption could potentially occur in the presence of another cacheable alias due to things like line migration (e.g. a CPU making a speculative fetch and taking ownership of a line that was in the system cache). To avoid that, you'd have to remove any cachable alias, for which we only have page-granular control. If that is not permitted, then no-snoop is effectively non-cacheable and non-coherent, and my comment doesn't hold. Thanks, Mark.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Revert "arm64: Increase the max granular size" Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-03-16 11:00 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Will Deacon <will.deacon@arm.com> - 2016-03-16 11:10 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Timur Tabi <timur@codeaurora.org> - 2016-03-16 14:10 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Mark Rutland <mark.rutland@arm.com> - 2016-03-16 15:10 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Will Deacon <will.deacon@arm.com> - 2016-03-16 15:40 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Mark Rutland <mark.rutland@arm.com> - 2016-03-16 16:00 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Catalin Marinas <catalin.marinas@arm.com> - 2016-03-16 15:20 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Timur Tabi <timur@codeaurora.org> - 2016-03-16 16:30 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Catalin Marinas <catalin.marinas@arm.com> - 2016-03-17 15:30 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Timur Tabi <timur@codeaurora.org> - 2016-03-17 16:00 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Catalin Marinas <catalin.marinas@arm.com> - 2016-03-17 16:40 +0100
Re: [PATCH] Revert "arm64: Increase the max granular size" Marc Zyngier <marc.zyngier@arm.com> - 2016-03-17 17:10 +0100
csiph-web