Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs_files.c: make sure that fs_getfilep is not interrupted when holding mutex #11125

Merged
merged 1 commit into from Nov 6, 2023

Conversation

raiden00pl
Copy link
Contributor

@raiden00pl raiden00pl commented Nov 4, 2023

Summary

Impact

fix #6012

Testing

b-g431b-esc1

Not tested enough for SMP targets (only some basic tests on qemu sabre-6quad/smp configuration).
I would be grateful if someone could help me verify whether this change doesn't break the performance of SMP in accessing file system or has other unwanted effects.

@zouboan
Copy link
Contributor

zouboan commented Nov 4, 2023

Is there any problem with using spin_lock_irqsave and spin_unlock_irqrestore?

@raiden00pl
Copy link
Contributor Author

The logic within spin_lock_irqsave() should not suspend (according to https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629502).
In this case nxmutex_lock() may block an executing thread so xxx_critical_section() looks like the only way.

@zouboan
Copy link
Contributor

zouboan commented Nov 4, 2023

got it,thank you!

@xiaoxiang781216 xiaoxiang781216 merged commit 607792d into apache:master Nov 6, 2023
26 checks passed
@raiden00pl raiden00pl deleted the fs_files branch November 13, 2023 18:59
@jerpelea jerpelea added this to To-Add in Release Notes - 12.4.0 Dec 27, 2023
@jerpelea jerpelea moved this from To-Add to fs in Release Notes - 12.4.0 Jan 8, 2024
@jerpelea jerpelea moved this from fs to processed in Release Notes - 12.4.0 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Low priority tasks interrupt high priority threads
3 participants