Skip to content

ASoC: SOF: add field to keep track of active cores for SMP - #557

Merged
plbossart merged 2 commits into
thesofproject:topic/sof-devfrom
ranj063:fix/multicore_coremask
Feb 14, 2019
Merged

plbossart merged 2 commits into
thesofproject:topic/sof-devfrom
ranj063:fix/multicore_coremask

Conversation

@ranj063

@ranj063 ranj063 commented Jan 17, 2019

Copy link
Copy Markdown
Collaborator

Add a field "active_cores_mask" to keep track of the active
cores for multicore platforms and update it during topology
loading/unloading.

Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com

@ranj063
ranj063 requested review from plbossart and tlauda January 17, 2019 18:02
@ranj063

ranj063 commented Jan 17, 2019

Copy link
Copy Markdown
Collaborator Author

fixes #394

@ranj063
ranj063 force-pushed the fix/multicore_coremask branch from e1c3666 to 3cba656 Compare January 17, 2019 18:10

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if this is too Intel-specific. If others such as @dbaluta could chime in it'd be good. Thanks!

Comment thread sound/soc/sof/loader.c Outdated

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if a platform can have two cores at boot? Better use e.g. init_core_mask in the description and make no assumption that there is a single core.

@ranj063

ranj063 commented Feb 11, 2019 •

Copy link
Copy Markdown
Collaborator Author

What if a platform can have two cores at boot? Better use e.g. init_core_mask in the description and make no assumption that there is a single core.

@plbossart got it

@ranj063
ranj063 force-pushed the fix/multicore_coremask branch from f79dfca to 0b87b03 Compare February 13, 2019 07:03
@ranj063

ranj063 commented Feb 13, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart updated now.

@ranj063
ranj063 force-pushed the fix/multicore_coremask branch from 0b87b03 to 5059cc7 Compare February 13, 2019 07:07

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, but the partitioning between patch1 and patch2 is odd.
Also we add this new field but do nothing with it?

Comment thread sound/soc/sof/loader.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is changed in the next patch, so could we squash this into the next patch and only add the definitions for active core mask in this patch, and make use of it in the next?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart fixed now

@ranj063
ranj063 force-pushed the fix/multicore_coremask branch from 5059cc7 to 2dca447 Compare February 13, 2019 17:47
@plbossart

Copy link
Copy Markdown
Member

This seems to be ok but does this solve the issue reported by @tlauda?
The only thing done with this active core mask is to track which pipelines are described in the topology file, but i don't see a clear connection with a pipeline activated by a DAPM transition. In other words the pipelines seem to be on on topology load and resume, I don't see a dynamic part depending on e.g. which streams are active.
What am I missing?
Or is this a different definition of 'active' :-)

@ranj063

ranj063 commented Feb 13, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart this does fix @tlauda 's issue.

But the definition of an active core is not that there's an active stream. It just says that there's a pipeline scheduled to run on it so keep it on. I'm not sure how the fw handles the multicore scenario. So to only turn the core on when the pipeline is active would probably be a future optimization.

@plbossart

plbossart commented Feb 13, 2019 via email

Copy link
Copy Markdown
Member

@ranj063

ranj063 commented Feb 13, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart sure. let me change it

@ranj063
ranj063 force-pushed the fix/multicore_coremask branch from 2dca447 to 61464c3 Compare February 13, 2019 21:18
@ranj063

ranj063 commented Feb 13, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart done

@plbossart

Copy link
Copy Markdown
Member

can you also update the comments: /* update active cores mask */

Add a field "enabled_cores_mask" to keep track of the cores
that are enabled in SMP and update it during topology
loading/unloading.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add a init_core_mask member to sof_intel_dsp_desc and set
the value for SKL+ platforms. This will be used to specify
which cores are enabled after fw boot is complete.

Also make snd_sof_dsp_run() op return the init_core_mask.
SKL- platforms with single core DSP's just return 1.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@ranj063
ranj063 force-pushed the fix/multicore_coremask branch from 61464c3 to e0272e7 Compare February 13, 2019 21:45
@ranj063

ranj063 commented Feb 13, 2019

Copy link
Copy Markdown
Collaborator Author

can you also update the comments: /* update active cores mask */

@plbossart sorry about that. fixed now

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ranj063

@plbossart
plbossart merged commit 153573a into thesofproject:topic/sof-dev Feb 14, 2019
@ranj063
ranj063 deleted the fix/multicore_coremask branch March 22, 2019 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants