Project

General

Profile

Actions

Bug #58000

closed

mds: switch submit_mutex to fair mutex for MDLog

Added by Xiubo Li over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Tags:
backport_processed
Backport:
pacific,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The implementations of the Mutex (e.g. std::mutex in C++) do not
guarantee fairness, they do not guarantee that the lock will be
acquired by threads in the order that they called the lock().

In most case this works well, but in overload case the client
requests handling thread and _submit_thread could always successfully
acquire the submit_mutex in a long time, which could make the
MDLog::trim() get stuck. That means the MDS daemons will fill journal
logs into the metadata pool, but couldn't trim the expired segments
in time.

This will switch the submit_mutex to fair mutex and it could make
sure that the all the submit_mutex waiters are in FIFO order and
could get a change to be excuted in time.


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #58343: pacific: mds: switch submit_mutex to fair mutex for MDLogResolvedXiubo LiActions
Copied to CephFS - Backport #58344: quincy: mds: switch submit_mutex to fair mutex for MDLogResolvedXiubo LiActions
Actions #2

Updated by Xiubo Li over 1 year ago

  • Pull request ID set to 48822
Actions #3

Updated by Venky Shankar over 1 year ago

  • Category set to Correctness/Safety
  • Status changed from New to Fix Under Review
  • Assignee set to Xiubo Li
  • Target version set to v18.0.0
  • Backport set to pacific,quincy
Actions #4

Updated by Venky Shankar over 1 year ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

Updated by Backport Bot over 1 year ago

  • Copied to Backport #58343: pacific: mds: switch submit_mutex to fair mutex for MDLog added
Actions #6

Updated by Backport Bot over 1 year ago

  • Copied to Backport #58344: quincy: mds: switch submit_mutex to fair mutex for MDLog added
Actions #7

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions #8

Updated by Xiubo Li about 1 year ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF