Skip to content

audio: buffer: do not mix cached and non-cached access in buffer_init - #7786

Merged
kv2019i merged 1 commit into
thesofproject:mainfrom
kv2019i:202306-buffer-alloc-refactor
Jun 14, 2023
Merged

kv2019i merged 1 commit into
thesofproject:mainfrom
kv2019i:202306-buffer-alloc-refactor

Conversation

@kv2019i

@kv2019i kv2019i commented Jun 12, 2023

Copy link
Copy Markdown
Collaborator

No reason to mix cached and noncached operations when initializing the buffer in buffer_ini(). We take a cached reference, so let's use that to initialize the object.

Comment thread src/audio/buffer.c Outdated
Comment thread src/audio/buffer.c Outdated
@kv2019i
kv2019i force-pushed the 202306-buffer-alloc-refactor branch from 02c8a16 to 0bf1fd8 Compare June 13, 2023 08:26
Comment thread src/audio/buffer.c Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

now these two lines kind of break the concept. On the one hand they're useless, because those list objects are members in lists, not list heads, OTOH we always do that and in some places we actually use the fact that list members are "empty heads" when they aren't on any list. And here it breaks the concept because it assigns

head->next = head;

where head now is a cached address and those lists are always linked with uncached addresses

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.

@lyakh pushed these out to uncached ops at the end in V3 version

No reason to mix cached and noncached operations when
initializing the buffer in buffer_alloc(). We take a cached
reference, so let's use that to initialize the object.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i
kv2019i force-pushed the 202306-buffer-alloc-refactor branch from 0bf1fd8 to 9040da6 Compare June 13, 2023 18:07
@kv2019i
kv2019i requested a review from lyakh June 14, 2023 12:03

@lyakh lyakh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't see any actual problem that this would fix, but it seems to happen to fix a tough so far inexplicable bug...

@marc-hb

marc-hb commented Jun 14, 2023

Copy link
Copy Markdown
Collaborator

This fix seems super-generic. Should it be backported? I mean after a while without noticing any regression.

@marc-hb

This comment was marked as resolved.

@marc-hb

marc-hb commented Jun 15, 2023 •

Copy link
Copy Markdown
Collaborator

MTLP_RVP_NOCODEC is unfortunately still failing as usual as before this PR.

My bad, https://sof-ci.01.org/softestpr/PR1058/build447/devicetest/index.html is very recent YET it ran with some old SOF commit 8fb011d that predates this PR?!?

This PR was merged on June 14 16:19:49 UTC and that test run was started on June 14 23:06:05 UTC, yet the test run used June 13 SOF commit 8fb011d. I have no idea why; will discuss and investigate in thesofproject/sof-test#1058.

Other recent test runs look better! Crossing fingers.

EDIT: it seems all sof-test PRs run with yesterday's SOF commit, this is new to me...

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.

6 participants