On Thu, Nov 08, 2012 at 06:48:19PM +0000, Steven Whitehouse wrote:
> > Converting to NL would actually be less expensive than unlock because the
> > NL convert does not involve a reply message, but unlock does.
> > 
> I'm not entirely sure I follow... at least from the filesystem point of
> view (and without your proposed change) both conversions and unlocks
> result in a reply. Is this a dlm internal reply perhaps?

Right, I was refering to the internal dlm reply over the network.

> > So skipping the unlocks is a first step that gives us a big benefit very
> > simply.  To benefit even further, we could later look into skipping the
> > "convert to NL" step also, and just abandoning the dlm locks in whatever
> > mode they're in; but that's probably not as simple a change.
> > 
> 
> Yes, thats true... the issue is that the glock state machine treats all
> glocks on an individual basis, and the demotion to NL also deals with
> any writing back and invalidating of the cache thats required at the
> same time. So that makes it tricky to separate from the requests to the
> dlm.
> 
> That said, I'd like to be able to move towards dealing with batches of
> glocks in the future, since that means we can provide a more favourable
> ordering of i/o requests. That is not an easy thing to do though.
> 
> In addition to the benefit for umount, I'm also wondering whether, if
> these unlocks are relatively slow, we should look at what happens during
> normal operation, where we do from time to time, send unlock requests.
> Those are mostly (though indirectly) in response to memory pressure. Is
> there anything we can do there to speed things up I wonder?

The main thing would be to not use a completion callback for dlm_unlock
(either make dlm not send one, or ignore it in gfs2).  This would let you
free the glock memory right away.

But, removing unlock completions can create new problems, because you'd
need to handle new errors from dlm_lock() when it ran up against an
incomplete unlock.  Dealing with that complication may negate any benefit
from ignoring unlock completions.  Unless, of course, you knew you
wouldn't be making any more dlm_lock calls on that lock, e.g. during
unmount.

Reply via email to