This document discusses challenges in system-on-chip (SoC) architectures and proposes using existing Linux frameworks to manage network-on-chip (NoC) interconnects. It outlines using the consumer-provider model to represent NoCs, describing topologies and endpoints in device trees, setting constraints between devices with PMQoS, and triggering updates through runtime power management. The goal is to leverage existing Linux infrastructure for controlling NoCs and improving performance, predictability and quality of service.
2. ENGINEERS
AND DEVICES
WORKING
TOGETHER
Agenda
● Overview of On-Chip interconnects
○ Cha llenges of SoC a rchitecture
○ Evolution of On-Chip interconnects
○ The Network-On-Chip concept
● Interconnects a nd the Linux kernel
○ Requirements
○ Existing infra structure
● Solutions a nd future work
3. ENGINEERS AND DEVICES
WORKING TOGETHER
Challenges of SoC Architecture
● High dema nd for integra ting more a nd more new fea tures (IP cores)
● Multiple processors (CPUs, dedica ted GPU, video decoder, gra phics cores,
ha rdwa re a ccelera tors, DSP, modem, ca mera , wifi, bluetooth, GPS etc.)
● Ma ny components ta lking to ea ch other
● High speed, fa st tra nsfers, better throughput etc.
● Multiple sources of tra ffic
● Predicta bility (ma ny interrupts, concurrent tra nsfers, DDR utiliza tion)
4. ENGINEERS AND DEVICES
WORKING TOGETHER
Evolution of On-Chip interconnects
● Roles of the interconnects
● Buses a nd crossba rs
● More complex ha rdwa re
● Sma ll footprint
● Verifica tion becomes more difficult
8. ENGINEERS AND DEVICES
WORKING TOGETHER
NoC approach benefits
● Sca la bility
● Pa cket communica tion
● Sha red resources (links, memory)
● Priority a nd QoS
● Loa d ba la ncing
● Power efficiency (short wires)
9. ENGINEERS
AND DEVICES
WORKING
TOGETHER
Network-On-Chip and Linux
● We wa nt to controlthe NoCs a nd use of a llbenefits
● But how to do this in Linux…this ha s been not fully
a ddressed yet
● Out of the tree implementa tions
● How does this fit in the Linux kernel?
10. ENGINEERS AND DEVICES
WORKING TOGETHER
An example use case
● Device Xwa nts to rea ch device Yover a few NoCs
● On wha t port is device Xconnected
● Wha t a re the endpoints which device Xca n a ccess
● Find the route to the destina tion endpoint
● Ea ch node a ggrega tes the requests a nd set QoS in ha rdwa re
13. ENGINEERS AND DEVICES
WORKING TOGETHER
What do we need to solve this?
● Topology description of how the devices a nd buses a re interconnected
● APIfor setting constra ints on devices (source a nd destina tion pa ir)
● Driver for the vendor specific ha rdwa re
● QoS upda te triggers
14. ENGINEERS AND DEVICES
WORKING TOGETHER
Use existing Linux frameworks and infrastructure
1/2
● The driver model
● Device-tree
● Consumer/provider ba sed API
● Power ma na gement
● Opera ting Performa nce Points
● Devfreq
15. ENGINEERS AND DEVICES
WORKING TOGETHER
Use existing Linux frameworks and infrastructure
2/2
● Dyna mic Volta ge a nd Frequency Sca ling
● Runtime PM
● Generic PMdoma ins
● PMQoS
● Issues - la yering a nd a bstra ction
16. ENGINEERS AND DEVICES
WORKING TOGETHER
Consumer-provider model
● Alrea dy used in ma ny kernelsubsystems
● Modelthe interconnects a nd buses a s performa nce providers
● The provider implementa tion is vendor specific a nd should provide the
following ca llba cks a s a minimum:
○ init()- for initia lizing the ha rdwa re
○ upda te()- for upda ting/setting the constra ints
● The consumers use get/put APIfunctions
● Consumers set constra ints on the pa th to a n endpoint.
● The vendor-specific code upda tes a ll the nodes on the pa th
17. ENGINEERS AND DEVICES
WORKING TOGETHER
Device-tree
1/2● Describe interconnects between devices
● Ca ll the NoC ha rdwa re a performa nce provider
● Crea te a DT node for the NoC ha rdwa re controller
noc:noc@0120000 {
compa tible = “vendor,noc";
reg = <0x120000 0x10000>;
#performa nce-cells = <1>;
}
18. ENGINEERS AND DEVICES
WORKING TOGETHER
Device-tree
2/2● Ca ll the consumer device a performa nce consumer
● How a nd where the device is connected
● Describe endpoints, flow direction, priorities etc.
● Use a get()APIto cla im the link resource
● Add link metrics?
consumer:device@0340000 {
...
performa nce-port = <&noc 4>; /*connected to port 4 on NoC */
performa nce-na mes = "usb", "displa y"; /*give a na me to ea ch link */
performa nce-links = <&usb>, <&displa y>; /*pha ndles to device nodes
*/
}
19. ENGINEERS AND DEVICES
WORKING TOGETHER
Per device PMQoS
● Alrea dy exists in the kernelbut it is still not widely used
● Used to store constra ints per ea ch device.
● Add constra ints ba sed on source a nd destina tion device pa ir
● Extend to support more tha n just min/ma x/sum
20. ENGINEERS AND DEVICES
WORKING TOGETHER
Runtime PM
● Currently power ma na gement is idle-ba sed
● The trigger is runtime_pm_put()
● Add support for a ctive-ba sed power ma na gement
● Use runtime_pm_get() a s a trigger for upda ting the bus/device performa nce
21. ENGINEERS AND DEVICES
WORKING TOGETHER
Generic PMdomains
● Allow grouping of devices with simila r cha ra cteristics
● Currently used for ha rdwa re power doma ins
● Support governors
● Extend genpd to a llow a device to be in multiple PMdoma ins
22. ENGINEERS
AND DEVICES
WORKING
TOGETHER
The Solution?
● Performa nce fra mework or interconnect fra mework?
● Consumer - provider ba sed model
● Use device-tree to describe where a device is connected
a nd cla im the “links” a s resources
● “Functiona l dependencies between devices”pa tchset
● Extend PMQoS
● Use runtime_pm_get() a s trigger
● Use Generic PMDoma ins for grouping devices?
● Involve more people from the community a nd from
different vendors
23. ENGINEERS AND DEVICES
WORKING TOGETHER
Future work
● The “Functiona l dependencies between devices”pa tchset by Ra fa elWysocki
is pla nned for 4.10
● Extend PMQoS with source a nd destina tion device pa irs?
● Add support for devices in multiple PMdoma ins?
● “BoF:Linux Device Performa nce Fra mework”a t ELCE (11.Oct.2016 Berlin)
● Reminder: There will be a session for discussions a fter lunch!