<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/gfs2/locking/dlm/thread.c, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-03-24T11:21:14Z</updated>
<entry>
<title>GFS2: Merge lock_dlm module into GFS2</title>
<updated>2009-03-24T11:21:14Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2009-01-12T10:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f057f6cdf64175db1151b1f5d110e29904f119a1'/>
<id>urn:sha1:f057f6cdf64175db1151b1f5d110e29904f119a1</id>
<content type='text'>
This is the big patch that I've been working on for some time
now. There are many reasons for wanting to make this change
such as:
 o Reducing overhead by eliminating duplicated fields between structures
 o Simplifcation of the code (reduces the code size by a fair bit)
 o The locking interface is now the DLM interface itself as proposed
   some time ago.
 o Fewer lookups of glocks when processing replies from the DLM
 o Fewer memory allocations/deallocations for each glock
 o Scope to do further optimisations in the future (but this patch is
   more than big enough for now!)

Please note that (a) this patch relates to the lock_dlm module and
not the DLM itself, that is still a separate module; and (b) that
we retain the ability to build GFS2 as a standalone single node
filesystem with out requiring the DLM.

This patch needs a lot of testing, hence my keeping it I restarted
my -git tree after the last merge window. That way, this has the maximum
exposure before its merged. This is (modulo a few minor bug fixes) the
same patch that I've been posting on and off the the last three months
and its passed a number of different tests so far.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>[GFS2] Remove remote lock dropping code</title>
<updated>2008-06-27T08:39:44Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2008-06-03T13:09:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1bdad606338debc6384b2844f1b53cc436b3ac90'/>
<id>urn:sha1:1bdad606338debc6384b2844f1b53cc436b3ac90</id>
<content type='text'>
There are several reasons why this is undesirable:

 1. It never happens during normal operation anyway
 2. If it does happen it causes performance to be very, very poor
 3. It isn't likely to solve the original problem (memory shortage
    on remote DLM node) it was supposed to solve
 4. It uses a bunch of arbitrary constants which are unlikely to be
    correct for any particular situation and for which the tuning seems
    to be a black art.
 5. In an N node cluster, only 1/N of the dropped locked will actually
    contribute to solving the problem on average.

So all in all we are better off without it. This also makes merging
the lock_dlm module into GFS2 a bit easier.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>[GFS2] Fix ordering bug in lock_dlm</title>
<updated>2008-06-27T08:39:25Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2008-05-21T16:21:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f3c9d38a26be32abf9b8897e9e0afc7166c712dd'/>
<id>urn:sha1:f3c9d38a26be32abf9b8897e9e0afc7166c712dd</id>
<content type='text'>
This looks like a lot of change, but in fact its not. Mostly its
things moving from one file to another. The change is just that
instead of queuing lock completions and callbacks from the DLM
we now pass them directly to GFS2.

This gives us a net loss of two list heads per glock (a fair
saving in memory) plus a reduction in the latency of delivering
the messages to GFS2, plus we now have one thread fewer as well.
There was a bug where callbacks and completions could be delivered
in the wrong order due to this unnecessary queuing which is fixed
by this patch.

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Bob Peterson &lt;rpeterso@redhat.com&gt;
</content>
</entry>
<entry>
<title>[GFS2] Invalidate cache at correct point</title>
<updated>2008-03-31T09:41:44Z</updated>
<author>
<name>Benjamin Marzinski</name>
<email>bmarzins@redhat.com</email>
</author>
<published>2008-03-14T18:52:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=58e9fee13e579df44922172dbe3c9e3ba3edf7a3'/>
<id>urn:sha1:58e9fee13e579df44922172dbe3c9e3ba3edf7a3</id>
<content type='text'>
GFS2 wasn't invalidating its cache before it called into the lock manager
with a request that could potentially drop a lock.  This was leaving a
window where the lock could be actually be held by another node, but the
file's page cache would still appear valid, causing coherency problems.
This patch moves the cache invalidation to before the lock manager call
when dropping a lock. It also adds the option to the lock_dlm lock
manager to not use conversion mode deadlock avoidance, which, on a
conversion from shared to exclusive, could internally drop the lock, and
then reacquire in. GFS2 now asks lock_dlm to not do this.  Instead, GFS2
manually drops the lock and reacquires it.

Signed-off-by: Benjamin Marzinski &lt;bmarzins@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>[GFS2] check kthread_should_stop when waiting</title>
<updated>2008-01-25T08:07:49Z</updated>
<author>
<name>David Teigland</name>
<email>teigland@redhat.com</email>
</author>
<published>2007-11-07T15:03:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8cbc4342478311c2a85260a7ca54d96cb7f71f7b'/>
<id>urn:sha1:8cbc4342478311c2a85260a7ca54d96cb7f71f7b</id>
<content type='text'>
Use wait_event_interruptible() in the lock_dlm thread instead
of an open coded equivalent, and include a kthread_should_stop()
check in the wait test so we don't miss a kthread_stop().

Signed-off-by: David Teigland &lt;teigland@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>[GFS2] GFS2: chmod hung - fix race in thread creation</title>
<updated>2007-10-10T07:56:22Z</updated>
<author>
<name>Bob Peterson</name>
<email>rpeterso@redhat.com</email>
</author>
<published>2007-09-14T14:27:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55c0c4ac0be144014651b19e77c9b77f367955de'/>
<id>urn:sha1:55c0c4ac0be144014651b19e77c9b77f367955de</id>
<content type='text'>
The problem boiled down to a race between the gdlm_init_threads()
function initializing thread1 and its setting of blist = 1.
Essentially, "if (current == ls-&gt;thread1)" was checked by the thread
before the thread creator set ls-&gt;thread1.

Since thread1 is the only thread who is allowed to work on the
blocking queue, and since neither thread thought it was thread1, no one
was working on the queue.  So everything just sat.

This patch reuses the ls-&gt;async_lock spin_lock to fix the race,
and it fixes the problem.  I've done more than 2000 iterations of the
loop that was recreating the failure and it seems to work.

Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;

--
</content>
</entry>
<entry>
<title>[GFS2] Reduce size of struct gdlm_lock</title>
<updated>2007-07-09T07:22:21Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2007-05-14T16:43:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=41d7db0ab437bc84f8a6e77cccc626ce937605ac'/>
<id>urn:sha1:41d7db0ab437bc84f8a6e77cccc626ce937605ac</id>
<content type='text'>
This patch removes the completion (which is rather large) from struct
gdlm_lock in favour of using the wait_on_bit() functions. We don't need
to add any extra fields to the structure to do this, so we save 32 bytes
(on x86_64) per structure. This adds up to quite a lot when we may
potentially have millions of these lock structures,

Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Acked-by: David Teigland &lt;teigland@redhat.com&gt;
</content>
</entry>
<entry>
<title>[GFS2/DLM] Fix trailing whitespace</title>
<updated>2006-09-25T13:26:04Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2006-09-25T13:26:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=907b9bceb41fa46beae93f79cc4a2247df502c0f'/>
<id>urn:sha1:907b9bceb41fa46beae93f79cc4a2247df502c0f</id>
<content type='text'>
As per Andrew Morton's request, removed trailing whitespace.

Cc: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>[GFS2] Remove one typedef</title>
<updated>2006-09-07T19:50:20Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2006-09-07T19:50:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c089c325d5cda0f64a3cf8edf3aaafa148f200a'/>
<id>urn:sha1:1c089c325d5cda0f64a3cf8edf3aaafa148f200a</id>
<content type='text'>
This removes one of the typedefs from the locking interface. It
is replaced by a forward declaration of the gfs2 superblock. The
other two are not so easy to solve since in their case, they
can refer to one of two possible structures.

Cc: David Teigland &lt;teigland@redhat.com&gt;
Cc: Jan Engelhardt &lt;jengelh@linux01.gwdg.de&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
<entry>
<title>[GFS2] Change all types to uX style</title>
<updated>2006-09-04T16:49:07Z</updated>
<author>
<name>Steven Whitehouse</name>
<email>swhiteho@redhat.com</email>
</author>
<published>2006-09-04T16:49:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd915493fce912f1bd838ee1250737ecf33b8fae'/>
<id>urn:sha1:cd915493fce912f1bd838ee1250737ecf33b8fae</id>
<content type='text'>
This makes all fixed size types have consistent names.

Cc: Jan Engelhardt &lt;jengelh@linux01.gwdg.de&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
</content>
</entry>
</feed>
