All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: dm-devel@redhat.com, "Alasdair G. Kergon" <agk@redhat.com>
Subject: Re: [PATCHES] convert dm-thin to use dm-bufio
Date: Mon, 15 Aug 2011 10:04:17 +0100	[thread overview]
Message-ID: <20110815090416.GE3159@ubuntu> (raw)
In-Reply-To: <Pine.LNX.4.64.1108141602440.28009@hs20-bc2-1.build.redhat.com>

On Sun, Aug 14, 2011 at 04:18:29PM -0400, Mikulas Patocka wrote:
> * It has dynamic cache sizing, cache size can be configured by the user. 
> In case of inactivity over some time (a buffer is unused for a minute), 
> the buffers are freed. The original code had cache size hardcoded and it 
> couldn't be changed.

A big advantage, something that would have to be done for dm-block-manager.c.
 
> * Submit bios directly (if we can) without dm-io layer.

Also good.

> Notes:
> 
> * Buffer locking is not supported, I suppose it is not used for anything 
> anyway. If it is used, tell me, I can add it after reviewing it.

Locking is used throughout the btree code, and the persistent-data
library in general.  The only thing stopping us getting the benefit
specifically in thinp is the big rw lock in dm_thin_metadata.c.  As
the code matures I plan to relax this lock to allow one writer,
multiple readers.  We've spoken about this before.

Aside from that the locking is great for debugging.  I'd have it for
that alone, and consider turning it off for release builds.

So, I'm not going to back down on the locking.  If we merge
block-manager/bufio we need locking in the interface.

> * dm_bm_rebind_block_device changes the block device, but it is not used 
> for anything (dm-thinp never changes the device). I think it could be 
> removed.

I admit it's ugly, but it _is_ used.  The need comes about from the
metadata device's lifetime being longer than that of the dm table that
opens it.  So when a different pool table is loaded we reopen the
metadata device and 'rebind' it under the block-manager.

> * Two small bugs in dm-thin are fixed --- not closing the superblock 
> buffer on exit and improper termination sequence (the block devices were 
> closed before the buffer interface exited).

Thx, I'll grab these.


This comment in the bufio header worries me:

+ * WARNING: to avoid deadlocks, the thread can hold at most one buffer. Multiple
+ * threads can hold each one buffer simultaneously.

There are many cases where persistent-data holds 2 locks, (eg, rolling
locks as we update the spine of a btree).  Also the superblock is
currently held while transactions are open (we can easily change
this).  Is this limitation easy to get round?


- Joe

  reply	other threads:[~2011-08-15  9:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-14 20:18 [PATCHES] convert dm-thin to use dm-bufio Mikulas Patocka
2011-08-15  9:04 ` Joe Thornber [this message]
2011-08-15 18:26   ` Mikulas Patocka
2011-08-16  9:16     ` Joe Thornber
2011-08-16 22:03       ` Mikulas Patocka
2011-08-17  8:26         ` Joe Thornber
2011-08-18 22:31           ` Mikulas Patocka
2011-08-19  7:04             ` Mike Snitzer
2011-08-19  9:11               ` Joe Thornber
2011-08-19  9:46                 ` Mike Snitzer
2011-08-19 10:17                   ` Mike Snitzer
2011-08-19 10:22                   ` Joe Thornber
2011-08-19 13:49                     ` Mike Snitzer
2011-08-19 14:11                       ` Alasdair G Kergon
2011-08-19 13:31               ` Mikulas Patocka
2011-08-19 14:11                 ` Mike Snitzer
2011-08-19 15:37                 ` Joe Thornber
2011-08-19 18:25                   ` Mike Snitzer
2011-08-19 18:50                     ` Alasdair G Kergon
2011-08-19  9:12             ` [PATCHES] " Joe Thornber
2011-08-19 16:17               ` Joe Thornber
2011-08-20  1:10                 ` [PATCH 1/2] dm bufio: fix "value computed is not used" warnings Mike Snitzer
2011-08-20  1:10                   ` [PATCH 2/2] dm space map: only include bitops.h in dm-space-map-common.c Mike Snitzer
2011-08-22 13:29                   ` [PATCH 1/2] dm bufio: fix "value computed is not used" warnings Mikulas Patocka
2011-08-22 18:24                 ` [PATCHES] convert dm-thin to use dm-bufio Mikulas Patocka
2011-08-22 19:59                   ` Mikulas Patocka
2011-08-23 11:23                     ` Joe Thornber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110815090416.GE3159@ubuntu \
    --to=thornber@redhat.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mpatocka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.