
AMD HSA kernel driver - ferrari8608
http://lkml.iu.edu/hypermail/linux/kernel/1407.1/02923.html
======
jhartmann
I am super excited about this driver. I worked on the early drm first at
Precision Insight and then at VA Linux Systems, and having hardware validated
command streams seperate for each process is just such a huge deal for
performance. I wrote some proof of concept code awhile back that I posted to
the Mesa dev list for doing something like this without hardware support, and
based on my limited testing it would be a huge improvement in dma throughput.
Its nice to see something like this happening finally, I think it is a path to
getting a secure and highly performant driver. We have always had to make
security tradeoffs with performance in Linux land, now we actually might have
the infrastructure to get a chance at matching or beating Windows performance.
Terribly exciting.

~~~
mey
I glad to hear that, for a long time I've always considered Windows HAL
(certainly XP/2000 and beyond) to be something the Linux kernel needed to
really tackle the desktop.

------
j_s
What is HSA? (from the link)

 _Heterogeneous System Architecture (HSA) driver for radeon-family GPUs.

HSA allows different processor types (CPUs, DSPs, GPUs, etc..) to share system
resources more effectively via HW features including shared pageable memory,
userspace-accessible work queues, and platform-level atomics. In addition to
the memory protection mechanisms in GPUVM and IOMMUv2, the Sea Islands family
of GPUs also performs HW-level validation of commands passed in through the
queues (aka rings)._

~~~
dragontamer
The exciting part of HSA though is the APU architecture that AMD is putting
out. Its hardware specific, but the CPU and embedded GPU have a coherent
cache. (CPU and GPU are on the same die with APUs).

~~~
sliverstorm
Agreed, that's the most thrilling development to HSA in my eyes. Coherent
memory structures (with much of it shared) all the way down truly elevates the
GPU to first-class citizenship.

~~~
ris
What I don't really see, HSA-wise, is how they plan to cater for the fact that
graphics and compute cores favour significantly different types of memory (DDR
vs GDDR). From what I understand, one of the major cripplers of on-die
graphics so far as been its reliance on the same bog-standard memory interface
shared with the CPU. How will this interact with AMD's side-port memory
schemes?

~~~
dragontamer
In addition to what other posters have noted... there are rumors that future
AMD APUs are going to support both DDR4 and GDDR5 RAM.

[http://hardware-
beta.slashdot.org/story/14/01/20/0159210/amd...](http://hardware-
beta.slashdot.org/story/14/01/20/0159210/amd-considered-gddr5-for-kaveri-
might-release-eight-core-variant)

AMD has had sub-par (compared to Intel) memory controllers recently. So maybe
the improved memory is for naught. Nonetheless, they're working on it...

------
listic
1\. From the security point of view, does HSA driver present a significant
additional attack surface? I imagine some new kinds of tricks could become
possible, like they did with Hyper-Threading
[http://www.daemonology.net/hyperthreading-considered-
harmful...](http://www.daemonology.net/hyperthreading-considered-harmful/)

2\. Is HSA driver a roadblock for virtualization of the OS?

~~~
oakwhiz
I wonder how safe it will be to perform cryptography through HSA.

------
justin66
Has AMD HSA development been purely a Windows (and game console?) affair up
until this point?

edit: now I see that they've had a github up with Linux HSA drivers for a
while now. Is the significance of today's thing that the patches are making it
into the mainline kernel?

------
higherpurpose
I'm curious when we'll begin to see HSA implemented on ARM devices, too - next
year?

~~~
Sanddancer
Given AMD's announced roadmap[1], I'd say it's more likely to come in 2016.
Next year, they'll still be doing mostly stock ARM cores.

[1] [http://www.anandtech.com/show/7990/amd-announces-k12-core-
cu...](http://www.anandtech.com/show/7990/amd-announces-k12-core-custom-64bit-
arm-design-in-2016)

~~~
higherpurpose
Yeah, I didn't mean AMD's ARM cores, but when the other founding members of
HSA are going to use it for ARM.

~~~
Quequau
Apple already is.

~~~
ac29
Reference? I cant find any evidence apple is shipping HSA devices.

~~~
Quequau
As far as I understand, the A7 employs a shared memory architecture and Apple
did not publicize this fact until the recent developer conference.

[http://appleinsider.com/articles/14/06/16/inside-metal-
how-a...](http://appleinsider.com/articles/14/06/16/inside-metal-how-apple-
plans-to-unlock-the-secret-graphics-performance-the-a7-chip)

~~~
xamlhacker
HSA's requirements are far broader than those provided in Metal. A7's shared
memory implementation appears to be far too basic to be able to implement HSA-
type API. For example, on-demand paging, user-mode queueing and ability for
GPU to do CPU callbacks. Many systems can have shared memory but are not HSA
compliant.

