summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorDaniel Vacek <neelx@suse.com>2026-10-30 15:28:03 +0100
committerDavid Sterba <dsterba@suse.com>2026-11-23 18:20:34 +0100
commit6b456f4640f5319f1f3223cba5faddb5970ae809 (patch)
tree6cb5b71940d2dd3be270dd0d73f6c0c768cd3062 /tools/perf/scripts/python/bin
parent38c94b99f8743a5b9aab864a12ecf9a06d36aeb4 (diff)
btrfs: fix a livelock in wait_for_commit() on PREEMPT_RT
Peter reported [1] that running multiple RR tasks doing sync() on fully preemptible kernel may starve other/normal sync() tasks due to fs_info::trans_lock turned into rt_mutex. This is caused by RR tasks contending over the mutex with priority over other tasks, which in turn lack progress and they are no longer able to remove TRANS_STATE_COMPLETED transactions from the fs_info::trans_list. The offenders start looping in wait_for_commit() expecting the completed transactions to get off the trans_list but since they're bouncing the trans_lock the tasks with other/normal priority which are about to delist such transactions never get a chance to do so due to lower priority. A simple reproducer can be found in the mentioned email thread [1]. The situation can be resolved by boosting the priority of the starved tasks or dropping priority of the offenders. Thought this fix prevents the situation from happening in the first place. We simply delist the transactions before changing them to completed state. That breaks the loop condition. [1] https://lore.kernel.org/linux-btrfs/SJ0PR17MB4288C46458DCE2C015839D0FBB9E2@SJ0PR17MB4288.namprd17.prod.outlook.com/ Reported-by: Naulls, Peter <PeterNaulls@eaton.com> Fixes: 5fd76bf31ccfe ("btrfs: fix relocation crash due to premature return from btrfs_commit_transaction()") CC: stable@vger.kernel.org # 5.15+ Tested-by: Naulls, Peter <PeterNaulls@eaton.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Daniel Vacek <neelx@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions