From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Gregory Haskins <gregory.haskins@gmail.com>
Cc: Avi Kivity <avi@redhat.com>, Ingo Molnar <mingo@elte.hu>,
Anthony Liguori <anthony@codemonkey.ws>,
kvm@vger.kernel.org, alacrityvm-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
"Michael S. Tsirkin" <mst@redhat.com>,
"Ira W. Snyder" <iws@ovro.caltech.edu>,
Joel Becker <joel.becker@oracle.com>
Subject: Re: [PATCH v3 3/6] vbus: add a "vbus-proxy" bus model for vbus_driver objects
Date: Wed, 19 Aug 2009 12:34:13 -0700 [thread overview]
Message-ID: <1250710453.27590.192.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <1250709574.27590.178.camel@haakon2.linux-iscsi.org>
On Wed, 2009-08-19 at 12:19 -0700, Nicholas A. Bellinger wrote:
> On Wed, 2009-08-19 at 14:39 -0400, Gregory Haskins wrote:
> > Hi Nicholas
> >
> > Nicholas A. Bellinger wrote:
> > > On Wed, 2009-08-19 at 10:11 +0300, Avi Kivity wrote:
> > >> On 08/19/2009 09:28 AM, Gregory Haskins wrote:
> > >>> Avi Kivity wrote:
> > >
> > > <SNIP>
> > >
> > >>> Basically, what it comes down to is both vbus and vhost need
> > >>> configuration/management. Vbus does it with sysfs/configfs, and vhost
> > >>> does it with ioctls. I ultimately decided to go with sysfs/configfs
> > >>> because, at least that the time I looked, it seemed like the "blessed"
> > >>> way to do user->kernel interfaces.
> > >>>
> > >> I really dislike that trend but that's an unrelated discussion.
> > >>
> > >>>> They need to be connected to the real world somehow. What about
> > >>>> security? can any user create a container and devices and link them to
> > >>>> real interfaces? If not, do you need to run the VM as root?
> > >>>>
> > >>> Today it has to be root as a result of weak mode support in configfs, so
> > >>> you have me there. I am looking for help patching this limitation, though.
> > >>>
> > >>>
> > >> Well, do you plan to address this before submission for inclusion?
> > >>
> > >
> > > Greetings Avi and Co,
> > >
> > > I have been following this thread, and although I cannot say that I am
> > > intimately fimilar with all of the virtualization considerations
> > > involved to really add anything use to that side of the discussion, I
> > > think you guys are doing a good job of explaining the technical issues
> > > for the non virtualization wizards following this thread. :-)
> > >
> > > Anyways, I was wondering if you might be interesting in sharing your
> > > concerns wrt to configfs (conigfs maintainer CC'ed), at some point..?
> >
> > So for those tuning in, the reference here is the use of configfs for
> > the management of this component of AlacrityVM, called "virtual-bus"
> >
> > http://developer.novell.com/wiki/index.php/Virtual-bus
> >
> > > As you may recall, I have been using configfs extensively for the 3.x
> > > generic target core infrastructure and iSCSI fabric modules living in
> > > lio-core-2.6.git/drivers/target/target_core_configfs.c and
> > > lio-core-2.6.git/drivers/lio-core/iscsi_target_config.c, and have found
> > > it to be extraordinarly useful for the purposes of a implementing a
> > > complex kernel level target mode stack that is expected to manage
> > > massive amounts of metadata, allow for real-time configuration, share
> > > data structures (eg: SCSI Target Ports) between other kernel fabric
> > > modules and manage the entire set of fabrics using only intrepetered
> > > userspace code.
> >
> > I concur. Configfs provided me a very natural model to express
> > resource-containers and their respective virtual-device objects.
> >
> > >
> > > Using the 10000 1:1 mapped TCM Virtual HBA+FILEIO LUNs <-> iSCSI Target
> > > Endpoints inside of a KVM Guest (from the results in May posted with
> > > IOMMU aware 10 Gb on modern Nahelem hardware, see
> > > http://linux-iscsi.org/index.php/KVM-LIO-Target), we have been able to
> > > dump the entire running target fabric configfs hierarchy to a single
> > > struct file on a KVM Guest root device using python code on the order of
> > > ~30 seconds for those 10000 active iSCSI endpoints. In configfs terms,
> > > this means:
> > >
> > > *) 7 configfs groups (directories), ~50 configfs attributes (files) per
> > > Virtual HBA+FILEIO LUN
> > > *) 15 configfs groups (directories), ~60 configfs attributes (files per
> > > iSCSI fabric Endpoint
> > >
> > > Which comes out to a total of ~220000 groups and ~1100000 attributes
> > > active configfs objects living in the configfs_dir_cache that are being
> > > dumped inside of the single KVM guest instances, including symlinks
> > > between the fabric modules to establish the SCSI ports containing
> > > complete set of SPC-4 and RFC-3720 features, et al.
> > >
> > > Also on the kernel <-> user API interaction compatibility side, I have
> > > found the 3.x configfs enabled code adventagous over the LIO 2.9 code
> > > (that used an ioctl for everything) because it allows us to do backwards
> > > compat for future versions without using any userspace C code, which in
> > > IMHO makes maintaining userspace packages for complex kernel stacks with
> > > massive amounts of metadata + real-time configuration considerations.
> > > No longer having ioctl compatibility issues between LIO versions as the
> > > structures passed via ioctl change, and being able to do backwards
> > > compat with small amounts of interpreted code against configfs layout
> > > changes makes maintaining the kernel <-> user API really have made this
> > > that much easier for me.
> > >
> > > Anyways, I though these might be useful to the discussion as it releates
> > > to potental uses of configfs on the KVM Host or other projects that
> > > really make sense, and/or to improve the upstream implementation so that
> > > other users (like myself) can benefit from improvements to configfs.
> > >
> > > Many thanks for your most valuable of time,
> >
> > Thank you for the explanation of your setup.
> >
> > Configfs mostly works for the vbus project "as is". As Avi pointed out,
> > I currently have a limitation w.r.t. perms. Forgive me if what I am
> > about to say is overly simplistic. Its been quite a few months since I
> > worked on the configfs portion of the code, so my details may be fuzzy.
> >
> > What it boiled down to is I need is a way to better manage perms
>
> I have not looked at implementing this personally, so I am not sure how
> this would look in fs/configfs/ off the top of my head.. Joel, have you
> had any thoughts on this..?
>
Actually, something that I have been using is for simple stuff is:
if (!capable(CAP_SYS_ADMIN))
for controlling I/O to configfs attributes from non priviledged users
for iSCSI authentication information living in struct
config_item_operations lio_target_nacl_auth_cit, the code is here:
http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=blob;f=drivers/lio-core/iscsi_target_configfs.c;h=1230b74577076a184b756b3883fb56c6050c7d87;hb=HEAD#l803
I am also using the CONFIGFS Extended Macros, CONFIGS_EATTR() which I
created to allow me to use more than one struct config_groups per parent
structure, and use less lines of code when defining configfs attributes
using generic store() and show() functions:
http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=blob;f=include/target/configfs_macros.h
--nab
next prev parent reply other threads:[~2009-08-19 19:34 UTC|newest]
Thread overview: 126+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-14 15:42 [PATCH v3 0/6] AlacrityVM guest drivers Gregory Haskins
2009-08-14 15:42 ` [PATCH v3 1/6] shm-signal: shared-memory signals Gregory Haskins
2009-08-14 15:43 ` [PATCH v3 2/6] ioq: Add basic definitions for a shared-memory, lockless queue Gregory Haskins
2009-08-14 15:43 ` [PATCH v3 3/6] vbus: add a "vbus-proxy" bus model for vbus_driver objects Gregory Haskins
2009-08-15 10:32 ` Ingo Molnar
2009-08-15 19:15 ` Anthony Liguori
2009-08-16 7:16 ` Ingo Molnar
2009-08-17 13:54 ` Anthony Liguori
2009-08-17 14:23 ` Ingo Molnar
2009-08-17 14:14 ` Gregory Haskins
2009-08-17 14:58 ` Avi Kivity
2009-08-17 15:05 ` Ingo Molnar
2009-08-17 17:41 ` Michael S. Tsirkin
2009-08-17 20:17 ` Gregory Haskins
2009-08-18 8:46 ` Michael S. Tsirkin
2009-08-18 15:19 ` Gregory Haskins
2009-08-18 16:25 ` Michael S. Tsirkin
2009-08-18 15:53 ` [Alacrityvm-devel] " Ira W. Snyder
2009-08-18 16:51 ` Avi Kivity
2009-08-18 17:27 ` Ira W. Snyder
2009-08-18 17:47 ` Avi Kivity
2009-08-18 18:27 ` Ira W. Snyder
2009-08-18 18:52 ` Avi Kivity
2009-08-18 20:59 ` Ira W. Snyder
2009-08-18 21:26 ` Avi Kivity
2009-08-18 22:06 ` Avi Kivity
2009-08-19 0:44 ` Ira W. Snyder
2009-08-19 5:26 ` Avi Kivity
2009-08-19 0:38 ` Ira W. Snyder
2009-08-19 5:40 ` Avi Kivity
2009-08-19 15:28 ` Ira W. Snyder
2009-08-19 15:37 ` Avi Kivity
2009-08-19 16:29 ` Ira W. Snyder
2009-08-19 16:38 ` Avi Kivity
2009-08-19 21:05 ` Hollis Blanchard
2009-08-20 9:57 ` Stefan Hajnoczi
2009-08-20 10:08 ` Avi Kivity
2009-08-18 20:35 ` Michael S. Tsirkin
2009-08-18 21:04 ` Arnd Bergmann
2009-08-18 20:39 ` Michael S. Tsirkin
2009-08-18 20:57 ` Michael S. Tsirkin
2009-08-18 23:24 ` Ira W. Snyder
2009-08-18 1:08 ` Anthony Liguori
2009-08-18 7:38 ` Avi Kivity
2009-08-18 8:54 ` Michael S. Tsirkin
2009-08-18 13:16 ` Gregory Haskins
2009-08-18 13:45 ` Avi Kivity
2009-08-18 15:51 ` Gregory Haskins
2009-08-18 16:14 ` Ingo Molnar
2009-08-19 4:27 ` Gregory Haskins
2009-08-19 5:22 ` Avi Kivity
2009-08-19 13:27 ` Gregory Haskins
2009-08-19 14:35 ` Avi Kivity
2009-08-21 10:55 ` vbus design points: shm and shm-signals Gregory Haskins
2009-08-24 19:02 ` Anthony Liguori
2009-08-24 20:00 ` Gregory Haskins
2009-08-24 21:28 ` Gregory Haskins
2009-08-24 23:57 ` Anthony Liguori
2009-08-25 0:10 ` Anthony Liguori
2009-08-18 16:47 ` [PATCH v3 3/6] vbus: add a "vbus-proxy" bus model for vbus_driver objects Avi Kivity
2009-08-18 16:51 ` Michael S. Tsirkin
2009-08-19 5:36 ` Gregory Haskins
2009-08-19 5:48 ` Avi Kivity
2009-08-19 6:40 ` Gregory Haskins
2009-08-19 7:13 ` Avi Kivity
2009-08-19 11:40 ` Gregory Haskins
2009-08-19 11:49 ` Avi Kivity
2009-08-19 11:52 ` Gregory Haskins
2009-08-19 14:33 ` Michael S. Tsirkin
2009-08-20 12:12 ` Michael S. Tsirkin
2009-08-16 8:30 ` Avi Kivity
2009-08-17 14:16 ` Gregory Haskins
2009-08-17 14:59 ` Avi Kivity
2009-08-17 15:09 ` Gregory Haskins
2009-08-17 15:14 ` Ingo Molnar
2009-08-17 19:35 ` Gregory Haskins
2009-08-17 15:18 ` Avi Kivity
2009-08-17 13:02 ` Gregory Haskins
2009-08-17 14:25 ` Ingo Molnar
2009-08-17 15:05 ` Gregory Haskins
2009-08-17 15:08 ` Ingo Molnar
2009-08-17 19:33 ` Gregory Haskins
2009-08-18 8:33 ` Avi Kivity
2009-08-18 14:46 ` Gregory Haskins
2009-08-18 16:27 ` Avi Kivity
2009-08-19 6:28 ` Gregory Haskins
2009-08-19 7:11 ` Avi Kivity
2009-08-19 18:23 ` Nicholas A. Bellinger
2009-08-19 18:39 ` Gregory Haskins
2009-08-19 19:19 ` Nicholas A. Bellinger
2009-08-19 19:34 ` Nicholas A. Bellinger [this message]
2009-08-19 20:12 ` configfs/sysfs Avi Kivity
2009-08-19 20:48 ` configfs/sysfs Ingo Molnar
2009-08-19 20:53 ` configfs/sysfs Avi Kivity
2009-08-19 21:19 ` configfs/sysfs Nicholas A. Bellinger
2009-08-19 22:15 ` configfs/sysfs Gregory Haskins
2009-08-19 22:16 ` configfs/sysfs Joel Becker
2009-08-19 23:48 ` [Alacrityvm-devel] configfs/sysfs Alex Tsariounov
2009-08-19 23:54 ` configfs/sysfs Nicholas A. Bellinger
2009-08-20 6:09 ` configfs/sysfs Avi Kivity
2009-08-20 22:48 ` configfs/sysfs Joel Becker
2009-08-21 4:14 ` configfs/sysfs Avi Kivity
2009-08-19 18:26 ` [PATCH v3 3/6] vbus: add a "vbus-proxy" bus model for vbus_driver objects Gregory Haskins
2009-08-19 20:37 ` Avi Kivity
2009-08-19 20:53 ` Ingo Molnar
2009-08-20 17:25 ` Muli Ben-Yehuda
2009-08-20 20:58 ` Caitlin Bestler
2009-08-18 18:20 ` Arnd Bergmann
2009-08-18 19:08 ` Avi Kivity
2009-08-19 5:36 ` Gregory Haskins
2009-08-18 9:53 ` Michael S. Tsirkin
2009-08-18 10:00 ` Avi Kivity
2009-08-18 10:09 ` Michael S. Tsirkin
2009-08-18 10:13 ` Avi Kivity
2009-08-18 10:28 ` Michael S. Tsirkin
2009-08-18 10:45 ` Avi Kivity
2009-08-18 11:07 ` Michael S. Tsirkin
2009-08-18 11:15 ` Avi Kivity
2009-08-18 11:49 ` Michael S. Tsirkin
2009-08-18 11:54 ` Avi Kivity
2009-08-18 15:39 ` Gregory Haskins
2009-08-18 16:39 ` Michael S. Tsirkin
2009-08-17 15:13 ` Avi Kivity
2009-08-14 15:43 ` [PATCH v3 4/6] vbus-proxy: add a pci-to-vbus bridge Gregory Haskins
2009-08-14 15:43 ` [PATCH v3 5/6] ioq: add driver-side vbus helpers Gregory Haskins
2009-08-14 15:43 ` [PATCH v3 6/6] net: Add vbus_enet driver Gregory Haskins
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=1250710453.27590.192.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=alacrityvm-devel@lists.sourceforge.net \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=gregory.haskins@gmail.com \
--cc=iws@ovro.caltech.edu \
--cc=joel.becker@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®