<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/miscdevice.h, branch v2.6.34</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.34</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.34'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2010-01-15T09:43:29+00:00</updated>
<entry>
<title>vhost_net: a kernel-level virtio server</title>
<updated>2010-01-15T09:43:29+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2010-01-14T06:17:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a4d5c94e959359ece6d6b55045c3f046677f55c'/>
<id>urn:sha1:3a4d5c94e959359ece6d6b55045c3f046677f55c</id>
<content type='text'>
What it is: vhost net is a character device that can be used to reduce
the number of system calls involved in virtio networking.
Existing virtio net code is used in the guest without modification.

There's similarity with vringfd, with some differences and reduced scope
- uses eventfd for signalling
- structures can be moved around in memory at any time (good for
  migration, bug work-arounds in userspace)
- write logging is supported (good for migration)
- support memory table and not just an offset (needed for kvm)

common virtio related code has been put in a separate file vhost.c and
can be made into a separate module if/when more backends appear.  I used
Rusty's lguest.c as the source for developing this part : this supplied
me with witty comments I wouldn't be able to write myself.

What it is not: vhost net is not a bus, and not a generic new system
call. No assumptions are made on how guest performs hypercalls.
Userspace hypervisors are supported as well as kvm.

How it works: Basically, we connect virtio frontend (configured by
userspace) to a backend. The backend could be a network device, or a tap
device.  Backend is also configured by userspace, including vlan/mac
etc.

Status: This works for me, and I haven't see any crashes.
Compared to userspace, people reported improved latency (as I save up to
4 system calls per packet), as well as better bandwidth and CPU
utilization.

Features that I plan to look at in the future:
- mergeable buffers
- zero copy
- scalability tuning: figure out the best threading model to use

Note on RCU usage (this is also documented in vhost.h, near
private_pointer which is the value protected by this variant of RCU):
what is happening is that the rcu_dereference() is being used in a
workqueue item.  The role of rcu_read_lock() is taken on by the start of
execution of the workqueue item, of rcu_read_unlock() by the end of
execution of the workqueue item, and of synchronize_rcu() by
flush_workqueue()/flush_work(). In the future we might need to apply
some gcc attribute or sparse annotation to the function passed to
INIT_WORK(). Paul's ack below is for this RCU usage.

(Includes fixes by Alan Cox &lt;alan@linux.intel.com&gt;,
David L Stevens &lt;dlstevens@us.ibm.com&gt;,
Chris Wright &lt;chrisw@redhat.com&gt;)

Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Driver-Core: extend devnode callbacks to provide permissions</title>
<updated>2009-09-19T19:50:38+00:00</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2009-09-18T21:01:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e454cea20bdcff10ee698d11b8882662a0153a47'/>
<id>urn:sha1:e454cea20bdcff10ee698d11b8882662a0153a47</id>
<content type='text'>
This allows subsytems to provide devtmpfs with non-default permissions
for the device node. Instead of the default mode of 0600, null, zero,
random, urandom, full, tty, ptmx now have a mode of 0666, which allows
non-privileged processes to access standard device nodes in case no
other userspace process applies the expected permissions.

This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Driver Core: misc: add nodename support for misc devices.</title>
<updated>2009-06-16T04:30:25+00:00</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2009-04-30T13:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d405640539555b601e52f7d18f1f0b1345d18bf5'/>
<id>urn:sha1:d405640539555b601e52f7d18f1f0b1345d18bf5</id>
<content type='text'>
This adds support for misc devices to report their requested nodename to
userspace.  It also updates a number of misc drivers to provide the
needed subdirectory and device name to be used for them.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Jan Blunck &lt;jblunck@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[SCSI] mpt2sas: add MPT2SAS_MINOR(221) to miscdevice.h</title>
<updated>2009-03-13T20:57:40+00:00</updated>
<author>
<name>Eric Moore</name>
<email>eric.moore@lsi.com</email>
</author>
<published>2009-03-09T07:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dec3f95959bff957f5bcbf16c2a2823f7e33d1e7'/>
<id>urn:sha1:dec3f95959bff957f5bcbf16c2a2823f7e33d1e7</id>
<content type='text'>
Signed-off-by: Eric Moore &lt;eric.moore@lsi.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
</entry>
<entry>
<title>fuse: move FUSE_MINOR to miscdevice.h</title>
<updated>2008-11-26T11:03:54+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-11-26T11:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=193da6092764ab693da7170c5badbf60d7758c1d'/>
<id>urn:sha1:193da6092764ab693da7170c5badbf60d7758c1d</id>
<content type='text'>
Move FUSE_MINOR to miscdevice.h.  While at it, de-uglify the file.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
</content>
</entry>
<entry>
<title>PM: Remove destroy_suspended_device()</title>
<updated>2008-04-20T02:10:28+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2008-03-23T19:28:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b844eba292b477cda14582bfc6f535deed57a82d'/>
<id>urn:sha1:b844eba292b477cda14582bfc6f535deed57a82d</id>
<content type='text'>
After 2.6.24 there was a plan to make the PM core acquire all device
semaphores during a suspend/hibernation to protect itself from
concurrent operations involving device objects.  That proved to be
too heavy-handed and we found a better way to achieve the goal, but
before it happened, we had introduced the functions
device_pm_schedule_removal() and destroy_suspended_device() to allow
drivers to "safely" destroy a suspended device and we had adapted some
drivers to use them.  Now that these functions are no longer necessary,
it seems reasonable to remove them and modify their users to use the
normal device unregistration instead.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Misc: Add possibility to remove misc devices during suspend/resume</title>
<updated>2008-02-05T17:44:23+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2008-02-05T06:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=533354d4ac48b7df99f18f952e5d51c3f59ba56c'/>
<id>urn:sha1:533354d4ac48b7df99f18f952e5d51c3f59ba56c</id>
<content type='text'>
Make it possible to unregister a misc device object in a safe way during a
suspend/resume cycle.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Michael Buesch &lt;mb@bu3sch.de&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: "John W. Linville" &lt;linville@tuxdriver.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>KVM: Use own minor number</title>
<updated>2007-05-03T07:52:22+00:00</updated>
<author>
<name>Avi Kivity</name>
<email>avi@qumranet.com</email>
</author>
<published>2007-03-04T11:27:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bbe4432e669ab94fc8059e7ab878cafad7b8d123'/>
<id>urn:sha1:bbe4432e669ab94fc8059e7ab878cafad7b8d123</id>
<content type='text'>
Use the minor number (232) allocated to kvm by lanana.

Signed-off-by: Avi Kivity &lt;avi@qumranet.com&gt;
</content>
</entry>
<entry>
<title>Driver core: change misc class_devices to be real devices</title>
<updated>2006-12-01T22:51:59+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2006-07-27T23:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94fbcded4ea0dc14cbfb222a5c68372f150d1476'/>
<id>urn:sha1:94fbcded4ea0dc14cbfb222a5c68372f150d1476</id>
<content type='text'>
This also ment that some of the misc drivers had to also be fixed
up as they were assuming the device was a class_device.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed</title>
<updated>2006-06-26T19:25:08+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2005-06-21T04:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96192ff1a9d0c6ef365d21667080259d83ea2f5b'/>
<id>urn:sha1:96192ff1a9d0c6ef365d21667080259d83ea2f5b</id>
<content type='text'>
Also fixes all drivers that set this field.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
