All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Franciosi <felipe.franciosi@citrix.com>
To: George Dunlap <George.Dunlap@citrix.com>,
	Jonathan Ludlam <Jonathan.Ludlam@citrix.com>
Cc: Dave Scott <Dave.Scott@citrix.com>, Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	Yang Hongyang <yanghy@cn.fujitsu.com>
Subject: Re: [PATCH RFC 0/4] tools: Upstream blktap "2.5" as an	external repo
Date: Thu, 26 Mar 2015 16:25:33 +0000	[thread overview]
Message-ID: <9F2C4E7DFB7839489C89757A66C5AD62A4BE57@AMSPEX01CL03.citrite.net> (raw)
In-Reply-To: <55142F09.4020401@eu.citrix.com>

> -----Original Message-----
> From: xen-devel-bounces@lists.xen.org [mailto:xen-devel-
> bounces@lists.xen.org] On Behalf Of George Dunlap
> Sent: 26 March 2015 16:09
> To: Jonathan Ludlam
> Cc: Wei Liu; Dave Scott; Wen Congyang; Jonathan Ludlam; xen-
> devel@lists.xen.org; Ian Jackson; Yang Hongyang; Ian Campbell
> Subject: Re: [Xen-devel] [PATCH RFC 0/4] tools: Upstream blktap "2.5" as an
> external repo
> 
> On 03/26/2015 03:47 PM, Jon Ludlam wrote:
> > On Thu, Mar 26, 2015 at 12:46:06PM +0000, George Dunlap wrote:
> >> For some time, the blktap2 in-tree has bitrotted.  Many years ago the
> >> XenServer team at Citrix forked the code into a separate repository;
> >> several attempts have been made to upstream those changes back into
> >> Xen, to no avail.
> >>
> >> The blktap code at the moment is the only source of performant vhd
> >> format integration.  It's additionally in use by projects like the
> >> COLO project.
> >>
> >> This patch series removes the in-tree blktap2 code and treats the
> >> XenServer blktap tree as an upstream.  I've gotten agreement from the
> >> XenServer team to act as an upstream -- to accept patches fixing
> >> bugs, to help track down errors, and to attempt to help fix build
> >> breakages introduced by development.
> >>
> >> At the moment we're using the "blktap2" branch of XenServer's
> >> blktap.git.  (This has been sometimes known as "blktap 2.5".)  This
> >> branch is maintianed in order to provide a buildroot for OpenStack,
> >> and has also been used by the CentOS xen packages for several years
> >> now.
> >
> > It's probably worth mentioning again that there is a kernel patch
> > required. Some years ago I did some work to make the patch into a dkms
> > module, but since then the patch and the kernel have moved on and I
> > couldn't quite make it work any more; I'm afraid my kernel knowledge
> > is a bit lacking.
> >
> > The current patches used in XenServer are on github here:
> > https://github.com/xenserver/linux-3.x.pg/tree/master/master
> >
> > and the old dkms code is here:
> > https://github.com/xapi-project/blktap-dkms
> >
> > In case anyone is interested...!
> 
> Another thing I'd like to explore (since this took all of about an afternoon to get
> working) is what it would take to switch to using
> blktap3 instead.  As I understand from my conversations with the XenServer
> team, they use a kernel module in XenServer when mounting an image in dom0
> for scalability reasons; but there's no reason XenProject need to do the same
> thing.

Today, to access virtual disks in dom0 we use the blktap2 kernel module that Jonathan Ludlam mentioned. This provides a block device (in /dev/xen/blktap-2/tapdev<minor>). In the (somewhat distant) past, we actually had blkfront in dom0.

> I'd probably need some guidance from the XenServer team about an
> appropriate way to start that. :-)

What is also needed to get blktap3 working is a gntdev supporting grant copy. I believe this is the order they are applied in 3.10:
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0001-xen-install-xen-gntdev.h-and-xen-gntalloc.h.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/xen-gntdev-grant-copy.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0002-xen-gntdev-mark-userspace-PTEs-as-special-on-x86-PV-.patch
https://github.com/xenserver/linux-3.x.pg/blob/master/master/0003-xen-gntdev-provide-a-set-of-pages-for-the-VMA.patch

The _main_ difference between tapdisk2 and 3 is that tapdisk3 can connect directly to blkfront. It does all I/O via grant copies which has some implications in the way memory is handled in dom0.

Cheers,
Felipe



> 
>  -George
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2015-03-26 16:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 12:46 [PATCH RFC 0/4] tools: Upstream blktap "2.5" as an external repo George Dunlap
2015-03-26 12:46 ` [PATCH RFC 1/4] build: Reorganize and briefly document "external repo" template in tools/Makefile George Dunlap
2015-03-30  9:07   ` Ian Campbell
2015-03-26 12:46 ` [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo George Dunlap
2015-03-26 12:55   ` Ian Campbell
2015-03-26 14:04     ` George Dunlap
2015-03-30 14:33   ` Wei Liu
2015-03-30 14:41     ` Ian Campbell
2015-03-30 14:46       ` George Dunlap
2015-03-30 14:50       ` Andrew Cooper
2015-03-30 14:43     ` George Dunlap
2015-03-30 15:38       ` Wei Liu
2015-03-31  9:55         ` George Dunlap
2015-03-31 10:40           ` Stefano Stabellini
2015-03-31 11:10             ` George Dunlap
2015-03-31 12:02               ` Ian Campbell
2015-03-31 12:03               ` Ian Campbell
2015-03-26 12:46 ` [PATCH RFC 3/4] libxl: Use XenServer's blktap2.5 George Dunlap
2015-03-26 12:46 ` [PATCH RFC 4/4] tools: Remove in-tree blktap2 George Dunlap
2015-03-26 13:50 ` [PATCH RFC 0/4] tools: Upstream blktap "2.5" as an external repo George Dunlap
2015-03-26 15:47 ` Jon Ludlam
2015-03-26 16:08   ` George Dunlap
2015-03-26 16:25     ` Felipe Franciosi [this message]
2015-03-26 17:05       ` George Dunlap
2015-03-26 17:12         ` Andrew Cooper
2015-03-26 17:23           ` George Dunlap
2015-03-26 18:06             ` Felipe Franciosi
2015-03-26 16:42     ` Jon Ludlam

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=9F2C4E7DFB7839489C89757A66C5AD62A4BE57@AMSPEX01CL03.citrite.net \
    --to=felipe.franciosi@citrix.com \
    --cc=Dave.Scott@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=Jonathan.Ludlam@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=wency@cn.fujitsu.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanghy@cn.fujitsu.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.