[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] What is the order of processing a lock request?



--- Christine Caulfield <ccaulfie redhat com> wrote:

> Ja S wrote:
> > Hi, All:
> > 
> > 
> > When an application on a cluster node A needs to
> > access a file on a SAN storage, how DLM process
> the
> > lock request? 
> > 
> > Should DLM firstly determine whether there already
> > exists a lock resource mapped to the file, by
> doing
> > the following things in the order 1) looking at
> the
> > master lock resources on the node A, 2) searching
> the
> > local copies of lock resources on the node A, 3)
> > searching the lock directory on the node A to find
> out
> > whether a master lock resource assosicated with
> the
> > file exists on another node, 4) sending messages
> to
> > other nodes in the cluster for the location of the
> > master lock resource? 
> > 
> > I ask this question because from some online
> articles,
> > it seems that DLM will always search the
> cluster-wide
> > lock directory across the whole cluster first  to
> find
> > the location of the master lock resource. 
> > 
> > Can anyone kindly confirm the order of processes
> that
> > DLM does?
> > 
> 
> 
> This should be very well documented, as it's common
> amongst DLM
> implementations.
> 

I think I may be blind. I have not yet found a
document which describes the sequence of processes in
a precise way. I tried to read the source code but I
gave up due to lack of comments.


> If a node needs to lock a resource that it doesn't
> know about then it
> hashes the name to get a directory node ID, than
> asks that node for the
> master node. if there is no master node (the
> resource is not active)
> then the requesting node is made master
> 
> if the node does know the master, (other locks on
> the resource exist)
> then it will go straight to that master node.


Thanks for the description. 

However, one point is still not clear to me is how a
node can conclude whether it __knows__ the lock
resource or not?

Will the node search 1) the list of master lock
resources owned by itself, then 2) the list of local
copies of lock resouces stored on itself, then 3) the
lock directory on itself, sequentially? or just search
1) and 2) then if it cannot find any, it will get the
node ID based on a hash function (possibly the output
of the hash function is itself?) who may hold the
location of the master lock resource, then ask the
node for the master node, and so on? 


If so, what exact search algorithms are used, the
linear search, the binary search, or what else?


I would like to understand the processes in an exact
and precise way since our system has been heavily
loaded. Sometime there are more than 100K lock
resouces on a node. Understanding every bit of the
details will help us tune the current system.

Many thanks for your time and look forward to your
kind reply,

Regards,

Jas

> The node then asks the master for the lock.
> 
> The lock status (granted, waiting) is recorded in
> the local copy.
> 
> Chrissie
> 
> --
> Linux-cluster mailing list
> Linux-cluster redhat com
>
https://www.redhat.com/mailman/listinfo/linux-cluster
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]