Page MenuHomeFreeBSD

acpi: Tasks: Precisely report the maximum number of slots used
Needs ReviewPublic

Authored by olce on Mon, Oct 5, 5:04 PM.
Tags
None
Referenced Files
F174989741: D60375.id188737.diff
Wed, Oct 7, 10:53 AM
F174923384: D60375.diff
Wed, Oct 7, 12:14 AM
Unknown Object (File)
Tue, Oct 6, 2:36 AM
Unknown Object (File)
Tue, Oct 6, 2:36 AM
Unknown Object (File)
Tue, Oct 6, 2:35 AM
Unknown Object (File)
Tue, Oct 6, 2:35 AM
Unknown Object (File)
Tue, Oct 6, 2:35 AM
Unknown Object (File)
Tue, Oct 6, 12:49 AM
Subscribers

Details

Reviewers
obiwac
jkim
emaste
Summary

To this end, fix races when updating 'acpi_tasks_hiwater'.

In particular, one thread could enqueue first at a lower but
still-greater-than-the-current-maximum index, another thread then
enqueuing at some higher index, and then the first thread would update
'acpi_tasks_hiwater' while the second was exactly after the 'if (i >
acpi_tasks_hiwater)' but just before attempting the atomic_cmpset_int()
that updates 'acpi_task_hiwater', which then would fail (and the return
value was ignored), leading to the transient maximum not being recorded.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77729
Build 74612: arc lint + arc unit