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

Re: [dm-devel] Newbie questions



On Fri, Nov 28, 2003 at 02:46:49PM +1100, Alec Thomas wrote:
> Hello,
> 
> I have a couple of questions about device-mapper. I've had a look at the
> source and could not see an obvious answer.
> 
> Firstly, is it possible to utilize one device-mapper module from another
> without redirecting to the actual device?

No you will need to stack the devices, this is quite deliberate.  The
overhead is very small.  Write a target that 1 thing, and 1 thing only
;)

> My second question is somewhat related. I am thinking about doing a
> network based block device running on device mapper. What is the "best"
> way of communicating with user-space from a device-mapper module? I
> would like to do most of the network stuff in user-space to take
> advantage of existing cluster communication infrastructure, so it would
> need to be fairly high-speed for transfer of blocks to/from user-space.

This is a hard problem, since you have to be extremely careful to
avoid deadlocks due to memory allocation failure.  eg. if the the
physical memory is full, and so some io gets triggered to relieve this
presure, which goes through your target, which calls some userland
code which has been paged out ...

Communication with userland is envisaged as being a very rare
occurance, certainly not for every io.  You can use the status command
to get back some information from your target, and the
dm_table_event() function can be used to indicate to userland that the
status has changed.

> So, to summarize in a less rambling way :)...
> 
> Can device-mapper modules "chain" together without bouncing back through
> device nodes?

No

> What is the "best" way of communicating at high volume with user-space
> from a device-mapper module?

This is hard for reasons that are far wider than the dm design.

- Joe



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