[LU-82] CLIO lock cache caching useless locks Created: 09/Feb/11  Updated: 27/Nov/12  Resolved: 27/Nov/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.0.0, Lustre 2.1.0
Fix Version/s: Lustre 2.1.0

Type: Bug Priority: Critical
Reporter: Oleg Drokin Assignee: Jinshan Xiong (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 4015

 Description   

It seems that top locks cache is not killing locks that don't have any valid sublocks left, so this cache for actively used files grows to tens of locks easily slowing everything down.
To make things worse, sometimes these useless locks are matched against really wanted locks, but the cached lock is wider, so we try to enqueue a lock much wider than we actually need which leads to even more of a slowdown with shared file access.



 Comments   
Comment by Jinshan Xiong (Inactive) [ 09/Feb/11 ]

patch is at: http://review.whamcloud.com/227

Comment by Oleg Drokin [ 09/Feb/11 ]

Reassign to Jay since he is working on it.

Comment by Jinshan Xiong (Inactive) [ 18/Feb/11 ]

Let me describe this problem a little bit in detail so as to help inspect.

The root cause of this problem is due to the handling inside cl_lock_request(), where:

rc = cl_enqueue_locked(env, lock, io, enqflags);
if (rc == 0) {
if (cl_lock_fits_into(env, lock, need, io))

{ cl_lock_mutex_put(env, lock); cl_lock_lockdep_acquire(env, lock, enqflags); break; }

cl_unuse_locked(env, lock);

If a lock was matched but it turns out to not fit after queuing(this may happen if there is a race that the sublock was canceled, and then a new sublock is created), cl_unuse_locked will put the lock into CLS_NEW state. Some time later, when the sublock of this lock is canceled, it won't delete the top lock because its state is CLS_NEW. The new patch just does it.

Comment by Build Master (Inactive) [ 07/Mar/11 ]

Integrated in reviews-centos5 #407
LU-82 Remove useless clio locks

Jinshan Xiong : 296923908584532e581b71a7f9d8a6c6e8b7c8dd
Files :

  • lustre/lov/lovsub_lock.c
Comment by Jinshan Xiong (Inactive) [ 07/Mar/11 ]

resubmit the patch to http://review.whamcloud.com/#change,305

passed acc-sm test on lab machines.

Comment by Build Master (Inactive) [ 15/Mar/11 ]

Integrated in reviews-centos5 #465
LU-82 Remove useless clio locks

Jinshan Xiong : 03d3bfd55dc9598b96846eb87628addaf8b5f3de
Files :

  • lustre/lov/lovsub_lock.c
Comment by Build Master (Inactive) [ 16/Mar/11 ]

Integrated in lustre-master-centos5 #149
LU-82 Remove useless clio locks

Oleg Drokin : fa507031d245b08c7f24efed32819daf2aa42ab3
Files :

  • lustre/lov/lovsub_lock.c
Comment by Build Master (Inactive) [ 16/Mar/11 ]

Integrated in reviews-rhel6 #32
LU-82 Remove useless clio locks

Oleg Drokin : fa507031d245b08c7f24efed32819daf2aa42ab3
Files :

  • lustre/lov/lovsub_lock.c
Comment by Build Master (Inactive) [ 16/Mar/11 ]

Integrated in reviews-centos5 #482
LU-82 Remove useless clio locks

Oleg Drokin : fa507031d245b08c7f24efed32819daf2aa42ab3
Files :

  • lustre/lov/lovsub_lock.c
Generated at Sat Feb 10 01:03:35 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.