All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Smith <danms@us.ibm.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH 1/2] Add userspace device-mapper target
Date: Fri, 09 Feb 2007 07:54:03 -0800	[thread overview]
Message-ID: <m3k5yrgwdg.fsf@guaranine.beaverton.ibm.com> (raw)
In-Reply-To: <20070209081137X.fujita.tomonori@lab.ntt.co.jp> (FUJITA Tomonori's message of "Fri, 9 Feb 2007 08:11:38 +0900 (JST)")

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

FT> We need a pointer and length (or size) but not an offset. This
FT> enables an user-space to pass the kernel data to write. 

Why not an offset?  If the kernel knows nothing of the format of the
metadata, then userspace needs to be able to say "Put 512 bytes from
this buffer at sector 23 on the disk".

FT> You need to set bio->bi_sector. bio_map_user() just grabs user's
FT> pages and put them into a bio. Users of blk_rq_map_user (like
FT> SG_IO) doesn't need bio->bi_sector.

Right, ok, I've looked through scsi_ioctl.c and cdrom.c and I have a
much better idea of how it is currently used.
 
FT> Yeah, as you said, you can just allocate buffer and use it. If
FT> buffer is properly aligned, we can do zero-copy. But if not, the
FT> kernel allocates pages and copies user's pages
FT> (bio_copy_user).

Right.  I think this would be very good for both performance and ease
of use.  Keeping track of requests in userspace to properly handle the
endio and corresponding metadata flush can be a pain.  I don't think,
however, that we should completely get rid of the DMU_FLAG_SYNC
behavior, because if someone wanted to use dm-userspace block block
debugging or something, they may want to be able to intercept both the
request and the endio.

I'll take a stab at making this change and will post it when I have
something working...

- -- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@us.ibm.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFzJkmwtEf7b4GJVQRAsvPAKCCCmKCPqziEGA39pbpNB8rPm/URgCdFLQg
7zvBXPLXRhvsdezVQRAGMyg=
=r63I
-----END PGP SIGNATURE-----

  reply	other threads:[~2007-02-09 15:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-29 22:40 [PATCH 1/2] Add userspace device-mapper target Dan Smith
2007-01-31 12:39 ` FUJITA Tomonori
2007-01-31 15:25   ` Dan Smith
2007-02-01 15:47     ` FUJITA Tomonori
2007-02-08 15:48 ` FUJITA Tomonori
2007-02-08 16:33   ` Dan Smith
2007-02-08 23:11     ` FUJITA Tomonori
2007-02-09 15:54       ` Dan Smith [this message]
2007-02-10  0:34         ` FUJITA Tomonori
2007-02-19 15:16         ` Dan Smith
2007-02-19 23:55           ` FUJITA Tomonori
2007-02-21 21:35             ` Dan Smith
2007-02-28 16:24               ` Dan Smith

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=m3k5yrgwdg.fsf@guaranine.beaverton.ibm.com \
    --to=danms@us.ibm.com \
    --cc=dm-devel@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.