diff options
author | Saravana Kannan <[email protected]> | 2020-06-09 18:19:34 -0700 |
---|---|---|
committer | Rob Herring <[email protected]> | 2020-06-17 16:11:18 -0600 |
commit | bb278b149df9baceac8deea0f95d73c47b3effa8 (patch) | |
tree | 5fb1e234eeaf2edb4c50746275f5fe868ef8568b /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 7d34ca3854845398cb36866d14bbdc43dcec1ad0 (diff) |
of: property: Improve cycle detection when one of the devices is never added
Consider this example where -> means LHS device is a consumer of RHS
device and indentation represents "child of" of the previous device.
Device A -> Device C
Device B -> Device A
Device C
Without this commit:
1. Device A is added.
2. Device A is added to waiting for supplier list (Device C)
3. Device B is added
4. Device B is linked as a consumer to Device A
5. Device A doesn't probe because it's waiting for Device C to be added.
6. Device B doesn't probe because Device A hasn't probed.
7. Device C will never be added because it's parent hasn't probed.
So, Device A, B and C will be in a probe/add deadlock.
This commit detects this scenario and stops trying to create a device
link between Device A and Device C since doing so would create the
following cycle:
Device A -> Devic C -(parent)-> Device B -> Device A.
With this commit:
1. Device A is added.
3. Device B is added
4. Device B is linked as a consumer to Device A
5. Device A probes.
6. Device B probes because Device A has probed.
7. Device C is added and probed.
Signed-off-by: Saravana Kannan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Rob Herring <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions