[LU-36] mdd_la_get is called too many times in MDD Created: 06/Jan/11  Updated: 02/Jun/14  Resolved: 11/Mar/14

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

Type: Improvement Priority: Minor
Reporter: Liang Zhen (Inactive) Assignee: Lai Siyao
Resolution: Fixed Votes: 0
Labels: None

Rank (Obsolete): 8474

 Description   

I created this ticket for several reasons:

  • we called mdd_la_get for so many times in MDD, it's not good for performance of high contention pdir operations.
  • mdd_attr_check is not strictly correct under pdir operations, there is still chance to decrease ctime because we don't have exclusive lock on parent while checking ctime
  • mdd_attr_check_set_internal and mdd_attr_check_set_internal_locked can be merged into one function: mdd_cmtime_check_set_internal, because set cmtime is the only use-case of them.


 Comments   
Comment by Liang Zhen (Inactive) [ 06/Jan/11 ]

the first version patch is here:
http://review.whamcloud.com/#change,168

Comment by Liang Zhen (Inactive) [ 10/Jan/11 ]

Lai suggested to just remove oo_guard from ost_attr_get, I would like to think over it again later, if it's safe then previous patch can be simplified a lot, but at least I would keep some cleanup and fix for cmtime

Comment by Liang Zhen (Inactive) [ 25/Jan/11 ]

Lai, I'm thinking we probably still want to do this, because overhead of capability checking in the future, how do you think?

Comment by Lai Siyao [ 27/Jan/11 ]

Though capability is generated and authenticated in OSD layer, only the operations from client need capability check, while other internal operations from MDD to OSD will bypass capability. In brief capability will not be a cause here.

Comment by Lai Siyao [ 04/Jul/13 ]

Patch updated to master: http://review.whamcloud.com/#/c/6897/.
I'm wondering that if lu_attr is always cached in lu_object, it can be more efficient, and benefit subsequent operations on the same object, however this will consume more memory (80 bytes), and lead to less cached object. This is like kernel does for inode attributes.

Generated at Sat Feb 10 01:03:06 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.