mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
jbd2: Change j_state_lock to be a rwlock_t
Lockstat reports have shown that j_state_lock is a major source of lock contention, especially on systems with more than 4 CPU cores. So change it to be a read/write spinlock. Signed-off-by: "Theodore Ts'o" <[email protected]>
This commit is contained in:
parent
a51dca9cd3
commit
a931da6ac9
8 changed files with 114 additions and 110 deletions
|
|
@ -760,13 +760,13 @@ void ocfs2_set_journal_params(struct ocfs2_super *osb)
|
|||
if (osb->osb_commit_interval)
|
||||
commit_interval = osb->osb_commit_interval;
|
||||
|
||||
spin_lock(&journal->j_state_lock);
|
||||
write_lock(&journal->j_state_lock);
|
||||
journal->j_commit_interval = commit_interval;
|
||||
if (osb->s_mount_opt & OCFS2_MOUNT_BARRIER)
|
||||
journal->j_flags |= JBD2_BARRIER;
|
||||
else
|
||||
journal->j_flags &= ~JBD2_BARRIER;
|
||||
spin_unlock(&journal->j_state_lock);
|
||||
write_unlock(&journal->j_state_lock);
|
||||
}
|
||||
|
||||
int ocfs2_journal_init(struct ocfs2_journal *journal, int *dirty)
|
||||
|
|
|
|||
Loading…
Reference in a new issue