SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
What To Do When Your Device Depends
on Another One
Rafael J. Wysocki
Intel Linux Systems Engineering
September 25, 2019
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 1 / 20
Introduction Background
Devices Depend On One Another
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 2 / 20
Introduction Background
Simple Case: Tree Topology
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 3 / 20
Introduction Imperfections
Example: Driver Core and Power Management
Driver Core
Type
Middle Layer
Device Driver
Device
Action
PM Domain
Class
Bus
Device Driver
Device
Device
Device
DeviceDevice Device
DeviceDevice
Bus
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 4 / 20
Introduction Imperfections
Example: Driver Probe Ordering
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 5 / 20
Device Links Design
Idea: Light-weight Solution On Top Of What Is There
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 6 / 20
Device Links Design
Device Links Data Structure
Device
Device
Device
Device
DeviceDevice
Device
Device
Device
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 7 / 20
Device Links Post-probe Use Cases
System-wide PM And Shutdown Ordering
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 8 / 20
Device Links Post-probe Use Cases
Asynchronous Execution Of System-wide PM Callbacks
Call Notifiers
Freeze Tasks
Device Suspend Device Resume
Thaw Tasks
Call Notifiers
Wait For a Wakeup Interrupt
Call Notifiers
Freeze Tasks
Nonboot CPU Offline
System Core Offline
Device Suspend
Platform Offline
System Core Online
Nonboot CPU Online
Device Resume
Thaw Tasks
Call Notifiers
Platform Online
.prepare()
.suspend()
.suspend_late()
.suspend_noirq()
.prepare()
.suspend()
.suspend_late()
.suspend_noirq().resume_noirq()
.resume_early()
.resume()
.complete()
.resume_noirq()
.resume_early()
.resume()
.complete()
Wait For a Wakeup Event
Platform-based Suspend
Suspend to Idle
Working State
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 9 / 20
Device Links Post-probe Use Cases
PM-runtime Ordering
Suspended
Active
Is Idle?
YES
NO
SuspendResume
Trigger Event
DL_FLAG_PM_RUNTIME (+ DL_FLAG_RPM_ACTIVE)
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 10 / 20
Device Links Post-probe Use Cases
Device Links Usage In Power Management
Driver Core
Type
Middle Layer
Device Driver
Device
Action
PM Domain
Class
Bus
Device Driver
Device
Device
Device
DeviceDevice Device
DeviceDevice
Bus
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 11 / 20
Device Links Device Link Management
Managed Device Links
DL_FLAG_AUTOREMOVE_CONSUMER
DL_FLAG_AUTOREMOVE_SUPPLIER
DL_FLAG_AUTOPROBE_CONSUMER
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 12 / 20
Device Links Device Link Management
Stateless Device Links
DL_FLAG_STATELESS
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 13 / 20
API and State Machine Addition and Removal API
Adding Device Links
struct device_link *device_link_add(struct device *consumer,
struct device *supplier,
u32 flags);
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 14 / 20
API and State Machine Addition and Removal API
Removing Stateless Device Links
void device_link_del(struct device_link *link);
void device_link_remove(void *consumer,
struct device *supplier);
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 15 / 20
API and State Machine Device Link State Machine
Managed Device Link State Machine
Dormant
Available
Consumer
Probe
Supplier
Unbind
Active
Supplier
Probe
Consumer
Unbind
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 16 / 20
API and State Machine Device Link State Machine
Rules Regarding Device Link Flags
1 STATELESS bumps up the reference counter.
2 Passing STATELESS along with link management flags is invalid.
3 AUTOREMOVE_SUPPLIER overrides AUTOREMOVE_CONSUMER.
4 “No management flags” overrides both autoremove flags.
5 Passing AUTOPROBE_CONSUMER along with autoremove flags is invalid.
6 RPM_ACTIVE without PM_RUNTIME is ignored.
7 PM_RUNTIME can always be set and is never unset.
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 17 / 20
Wrap-Up Summary / Discussion
Questions? Comments? Concerns?
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 18 / 20
Resources
References
Greg Kroah-Hartman, Linux Driver Model (https://www.youtube.com/watch?v=AdPxeGHIZ74).
Rafael J. Wysocki, Power Management Challenges in Linux (https:
//www.linuxplumbersconf.org/2017/ocw//system/presentations/4652/original/linux_pm_challenges.pdf).
Rafael J. Wysocki, PM Infrastructure in the Linux Kernel – Current Status and Future
(https://events.linuxfoundation.org/sites/events/files/slides/kernel_PM_infra_0.pdf).
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 19 / 20
Disclaimer
Intel technologies’ features and benefits depend on system configuration
and may require enabled hardware, software or service activation.
Performance varies depending on system configuration. No computer
system can be absolutely secure. Check with your system manufacturer or
retailer or learn more at www.intel.com.
Intel and the Intel logo are trademarks of Intel Corporation in the U.S.
and/or other countries. *Other names and brands may be claimed as the
property of others.
c Intel Corporation
Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 20 / 20

Mais conteúdo relacionado

Semelhante a Kernel Recipes 2019 - What To Do When Your Device Depends on Another One

IETF 104: Deployment of validation reconsidered
IETF 104: Deployment of validation reconsideredIETF 104: Deployment of validation reconsidered
IETF 104: Deployment of validation reconsideredAPNIC
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksPharo
 
Fasten and Quartermaster presentation at FOSSCOMM, October 2019 in Lamia, Gre...
Fasten and Quartermaster presentation at FOSSCOMM, October 2019 in Lamia, Gre...Fasten and Quartermaster presentation at FOSSCOMM, October 2019 in Lamia, Gre...
Fasten and Quartermaster presentation at FOSSCOMM, October 2019 in Lamia, Gre...Fasten Project
 
DHS - Recommendations for Securing Zigbee Networks in Process Control Systems
DHS - Recommendations for Securing Zigbee Networks in Process Control SystemsDHS - Recommendations for Securing Zigbee Networks in Process Control Systems
DHS - Recommendations for Securing Zigbee Networks in Process Control SystemsMichael Smith
 
Improving Software quality for the Modern Web
Improving Software quality for the Modern WebImproving Software quality for the Modern Web
Improving Software quality for the Modern WebEuan Garden
 
Go Deep and Wide: No It’s Not a Football, It’s End-to-End Performance Management
Go Deep and Wide: No It’s Not a Football, It’s End-to-End Performance ManagementGo Deep and Wide: No It’s Not a Football, It’s End-to-End Performance Management
Go Deep and Wide: No It’s Not a Football, It’s End-to-End Performance ManagementCA Technologies
 
iperfTZ: Understanding Network Bottlenecks for TrustZone-based Applications
iperfTZ: Understanding Network Bottlenecks for TrustZone-based ApplicationsiperfTZ: Understanding Network Bottlenecks for TrustZone-based Applications
iperfTZ: Understanding Network Bottlenecks for TrustZone-based ApplicationsLEGATO project
 
DriveBuild: Automation of Simulation-based Testing of Autonomous Vehicles
DriveBuild: Automation of Simulation-based Testing of Autonomous VehiclesDriveBuild: Automation of Simulation-based Testing of Autonomous Vehicles
DriveBuild: Automation of Simulation-based Testing of Autonomous VehiclesUniversity of Passau
 
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Ruby Meditation
 
Service Mesh meets API Management - Verteilte Services gut im Griff!
Service Mesh meets API Management - Verteilte Services gut im Griff!Service Mesh meets API Management - Verteilte Services gut im Griff!
Service Mesh meets API Management - Verteilte Services gut im Griff!Holger Dietrich
 
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...CA Technologies
 
Case Study: University of California Shares Tips and Tricks for Leveraging CA...
Case Study: University of California Shares Tips and Tricks for Leveraging CA...Case Study: University of California Shares Tips and Tricks for Leveraging CA...
Case Study: University of California Shares Tips and Tricks for Leveraging CA...CA Technologies
 
Spark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware DevelopmentSpark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware DevelopmentAdaCore
 
Test your Kubernetes operator with Operator Lifecycle Management
Test your Kubernetes operator with Operator Lifecycle ManagementTest your Kubernetes operator with Operator Lifecycle Management
Test your Kubernetes operator with Operator Lifecycle ManagementBaiju Muthukadan
 
The Future of PLC Programming by WonderLogix
The Future of PLC Programming by WonderLogixThe Future of PLC Programming by WonderLogix
The Future of PLC Programming by WonderLogixsalesbuddy
 
Taking IT Analytics to the Next Level
Taking IT Analytics to the Next LevelTaking IT Analytics to the Next Level
Taking IT Analytics to the Next LevelCA Technologies
 
Mashup Visual Programming Environment
Mashup Visual Programming EnvironmentMashup Visual Programming Environment
Mashup Visual Programming EnvironmentDaniel De Sousa
 
Microwind: main features are layout and FinFET
Microwind: main features are layout and FinFETMicrowind: main features are layout and FinFET
Microwind: main features are layout and FinFETHoopeer Hoopeer
 

Semelhante a Kernel Recipes 2019 - What To Do When Your Device Depends on Another One (20)

IETF 104: Deployment of validation reconsidered
IETF 104: Deployment of validation reconsideredIETF 104: Deployment of validation reconsidered
IETF 104: Deployment of validation reconsidered
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorks
 
Fasten and Quartermaster presentation at FOSSCOMM, October 2019 in Lamia, Gre...
Fasten and Quartermaster presentation at FOSSCOMM, October 2019 in Lamia, Gre...Fasten and Quartermaster presentation at FOSSCOMM, October 2019 in Lamia, Gre...
Fasten and Quartermaster presentation at FOSSCOMM, October 2019 in Lamia, Gre...
 
DHS - Recommendations for Securing Zigbee Networks in Process Control Systems
DHS - Recommendations for Securing Zigbee Networks in Process Control SystemsDHS - Recommendations for Securing Zigbee Networks in Process Control Systems
DHS - Recommendations for Securing Zigbee Networks in Process Control Systems
 
Improving Software quality for the Modern Web
Improving Software quality for the Modern WebImproving Software quality for the Modern Web
Improving Software quality for the Modern Web
 
Go Deep and Wide: No It’s Not a Football, It’s End-to-End Performance Management
Go Deep and Wide: No It’s Not a Football, It’s End-to-End Performance ManagementGo Deep and Wide: No It’s Not a Football, It’s End-to-End Performance Management
Go Deep and Wide: No It’s Not a Football, It’s End-to-End Performance Management
 
iperfTZ: Understanding Network Bottlenecks for TrustZone-based Applications
iperfTZ: Understanding Network Bottlenecks for TrustZone-based ApplicationsiperfTZ: Understanding Network Bottlenecks for TrustZone-based Applications
iperfTZ: Understanding Network Bottlenecks for TrustZone-based Applications
 
07 PhoneGap
07 PhoneGap07 PhoneGap
07 PhoneGap
 
DriveBuild: Automation of Simulation-based Testing of Autonomous Vehicles
DriveBuild: Automation of Simulation-based Testing of Autonomous VehiclesDriveBuild: Automation of Simulation-based Testing of Autonomous Vehicles
DriveBuild: Automation of Simulation-based Testing of Autonomous Vehicles
 
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
 
Service Mesh meets API Management - Verteilte Services gut im Griff!
Service Mesh meets API Management - Verteilte Services gut im Griff!Service Mesh meets API Management - Verteilte Services gut im Griff!
Service Mesh meets API Management - Verteilte Services gut im Griff!
 
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
 
Case Study: University of California Shares Tips and Tricks for Leveraging CA...
Case Study: University of California Shares Tips and Tricks for Leveraging CA...Case Study: University of California Shares Tips and Tricks for Leveraging CA...
Case Study: University of California Shares Tips and Tricks for Leveraging CA...
 
Spark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware DevelopmentSpark / Ada for Safe and Secure Firmware Development
Spark / Ada for Safe and Secure Firmware Development
 
Test your Kubernetes operator with Operator Lifecycle Management
Test your Kubernetes operator with Operator Lifecycle ManagementTest your Kubernetes operator with Operator Lifecycle Management
Test your Kubernetes operator with Operator Lifecycle Management
 
The Future of PLC Programming by WonderLogix
The Future of PLC Programming by WonderLogixThe Future of PLC Programming by WonderLogix
The Future of PLC Programming by WonderLogix
 
Taking IT Analytics to the Next Level
Taking IT Analytics to the Next LevelTaking IT Analytics to the Next Level
Taking IT Analytics to the Next Level
 
2011/09/13 - Introduction
2011/09/13 - Introduction2011/09/13 - Introduction
2011/09/13 - Introduction
 
Mashup Visual Programming Environment
Mashup Visual Programming EnvironmentMashup Visual Programming Environment
Mashup Visual Programming Environment
 
Microwind: main features are layout and FinFET
Microwind: main features are layout and FinFETMicrowind: main features are layout and FinFET
Microwind: main features are layout and FinFET
 

Mais de Anne Nicolas

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstAnne Nicolas
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIAnne Nicolas
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyAnne Nicolas
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureAnne Nicolas
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Anne Nicolas
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataAnne Nicolas
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Anne Nicolas
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxAnne Nicolas
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialAnne Nicolas
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconAnne Nicolas
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureAnne Nicolas
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayAnne Nicolas
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerAnne Nicolas
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationAnne Nicolas
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingAnne Nicolas
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaAnne Nicolas
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedAnne Nicolas
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPAnne Nicolas
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Anne Nicolas
 

Mais de Anne Nicolas (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
 

Último

Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 

Último (20)

Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 

Kernel Recipes 2019 - What To Do When Your Device Depends on Another One

  • 1. What To Do When Your Device Depends on Another One Rafael J. Wysocki Intel Linux Systems Engineering September 25, 2019 Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 1 / 20
  • 2. Introduction Background Devices Depend On One Another Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 2 / 20
  • 3. Introduction Background Simple Case: Tree Topology Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 3 / 20
  • 4. Introduction Imperfections Example: Driver Core and Power Management Driver Core Type Middle Layer Device Driver Device Action PM Domain Class Bus Device Driver Device Device Device DeviceDevice Device DeviceDevice Bus Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 4 / 20
  • 5. Introduction Imperfections Example: Driver Probe Ordering Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 5 / 20
  • 6. Device Links Design Idea: Light-weight Solution On Top Of What Is There Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 6 / 20
  • 7. Device Links Design Device Links Data Structure Device Device Device Device DeviceDevice Device Device Device Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 7 / 20
  • 8. Device Links Post-probe Use Cases System-wide PM And Shutdown Ordering Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 8 / 20
  • 9. Device Links Post-probe Use Cases Asynchronous Execution Of System-wide PM Callbacks Call Notifiers Freeze Tasks Device Suspend Device Resume Thaw Tasks Call Notifiers Wait For a Wakeup Interrupt Call Notifiers Freeze Tasks Nonboot CPU Offline System Core Offline Device Suspend Platform Offline System Core Online Nonboot CPU Online Device Resume Thaw Tasks Call Notifiers Platform Online .prepare() .suspend() .suspend_late() .suspend_noirq() .prepare() .suspend() .suspend_late() .suspend_noirq().resume_noirq() .resume_early() .resume() .complete() .resume_noirq() .resume_early() .resume() .complete() Wait For a Wakeup Event Platform-based Suspend Suspend to Idle Working State Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 9 / 20
  • 10. Device Links Post-probe Use Cases PM-runtime Ordering Suspended Active Is Idle? YES NO SuspendResume Trigger Event DL_FLAG_PM_RUNTIME (+ DL_FLAG_RPM_ACTIVE) Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 10 / 20
  • 11. Device Links Post-probe Use Cases Device Links Usage In Power Management Driver Core Type Middle Layer Device Driver Device Action PM Domain Class Bus Device Driver Device Device Device DeviceDevice Device DeviceDevice Bus Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 11 / 20
  • 12. Device Links Device Link Management Managed Device Links DL_FLAG_AUTOREMOVE_CONSUMER DL_FLAG_AUTOREMOVE_SUPPLIER DL_FLAG_AUTOPROBE_CONSUMER Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 12 / 20
  • 13. Device Links Device Link Management Stateless Device Links DL_FLAG_STATELESS Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 13 / 20
  • 14. API and State Machine Addition and Removal API Adding Device Links struct device_link *device_link_add(struct device *consumer, struct device *supplier, u32 flags); Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 14 / 20
  • 15. API and State Machine Addition and Removal API Removing Stateless Device Links void device_link_del(struct device_link *link); void device_link_remove(void *consumer, struct device *supplier); Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 15 / 20
  • 16. API and State Machine Device Link State Machine Managed Device Link State Machine Dormant Available Consumer Probe Supplier Unbind Active Supplier Probe Consumer Unbind Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 16 / 20
  • 17. API and State Machine Device Link State Machine Rules Regarding Device Link Flags 1 STATELESS bumps up the reference counter. 2 Passing STATELESS along with link management flags is invalid. 3 AUTOREMOVE_SUPPLIER overrides AUTOREMOVE_CONSUMER. 4 “No management flags” overrides both autoremove flags. 5 Passing AUTOPROBE_CONSUMER along with autoremove flags is invalid. 6 RPM_ACTIVE without PM_RUNTIME is ignored. 7 PM_RUNTIME can always be set and is never unset. Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 17 / 20
  • 18. Wrap-Up Summary / Discussion Questions? Comments? Concerns? Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 18 / 20
  • 19. Resources References Greg Kroah-Hartman, Linux Driver Model (https://www.youtube.com/watch?v=AdPxeGHIZ74). Rafael J. Wysocki, Power Management Challenges in Linux (https: //www.linuxplumbersconf.org/2017/ocw//system/presentations/4652/original/linux_pm_challenges.pdf). Rafael J. Wysocki, PM Infrastructure in the Linux Kernel – Current Status and Future (https://events.linuxfoundation.org/sites/events/files/slides/kernel_PM_infra_0.pdf). Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 19 / 20
  • 20. Disclaimer Intel technologies’ features and benefits depend on system configuration and may require enabled hardware, software or service activation. Performance varies depending on system configuration. No computer system can be absolutely secure. Check with your system manufacturer or retailer or learn more at www.intel.com. Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries. *Other names and brands may be claimed as the property of others. c Intel Corporation Rafael J. Wysocki Addressing Device Dependencies September 25, 2019 20 / 20