Asias He | 25 May 04:34
Picon
Favicon

[PATCH 0/3] Fix hot-unplug race in virtio-blk

This patch set fixes the race when hot-unplug stressed disk.

Asias He (3):
  virtio-blk: Call del_gendisk() before disable guest kick
  virtio-blk: Reset device after blk_cleanup_queue()
  virtio-blk: Use block layer provided spinlock

 drivers/block/virtio_blk.c |   25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)

--

-- 
1.7.10.2
Marek Marczykowski | 20 May 13:45

[PATCH] xen: do not disable netfront in dom0

Netfront driver can be also useful in dom0, eg when all NICs are assigned to
some domU (aka driver domain). Then using netback in domU and netfront in dom0
is the only way to get network access in dom0.

Signed-off-by: Marek Marczykowski <marmarek <at> invisiblethingslab.com>
---
 drivers/net/xen-netfront.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 698b905..e31ebff 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1953,9 +1953,6 @@ static int __init netif_init(void)
 	if (!xen_domain())
 		return -ENODEV;

-	if (xen_initial_domain())
-		return 0;
-
 	printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n");

 	return xenbus_register_frontend(&netfront_driver);
@@ -1965,9 +1962,6 @@ module_init(netif_init);

 static void __exit netif_exit(void)
 {
-	if (xen_initial_domain())
-		return;
-
(Continue reading)

Chen Baozi | 20 May 04:44
Picon

[PATCH] virtio: fix typo in comment

From: Chen Baozi <chenbaozi <at> gmail.com>

- Delete "@request_vqs" and "@free_vqs" comments, since
  they are no longer in struct virtio_config_ops.
- According to the macro below, "@val" should be "@v".

Signed-off-by: Chen Baozi <chenbaozi <at> gmail.com>
---
 include/linux/virtio_config.h |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 7323a33..fc457f4 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -74,15 +74,6 @@
  * @set_status: write the status byte
  *	vdev: the virtio_device
  *	status: the new status byte
- * @request_vqs: request the specified number of virtqueues
- *	vdev: the virtio_device
- *	max_vqs: the max number of virtqueues we want
- *      If supplied, must call before any virtqueues are instantiated.
- *      To modify the max number of virtqueues after request_vqs has been
- *      called, call free_vqs and then request_vqs with a new value.
- * @free_vqs: cleanup resources allocated by request_vqs
- *	vdev: the virtio_device
- *      If supplied, must call after all virtqueues have been deleted.
  * @reset: reset the device
  *	vdev: the virtio device
(Continue reading)

Asias He | 21 May 11:08
Picon
Favicon

[RFC PATCH 1/5] block: Introduce q->abort_queue_fn()

When user hot-unplug a disk which is busy serving I/O, __blk_run_queue
might be unable to drain all the requests. As a result, the
blk_drain_queue() would loop forever and blk_cleanup_queue would not
return. So hot-unplug will fail.

This patch adds a callback in blk_drain_queue() for low lever driver to
abort requests.

Currently, this is useful for virtio-blk to do cleanup in hot-unplug.

Cc: Jens Axboe <axboe <at> kernel.dk>
Cc: Tejun Heo <tj <at> kernel.org>
Cc: linux-fsdevel <at> vger.kernel.org
Cc: Rusty Russell <rusty <at> rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst <at> redhat.com>
Cc: virtualization <at> lists.linux-foundation.org
Cc: kvm <at> vger.kernel.org
Signed-off-by: Asias He <asias <at> redhat.com>
---
 block/blk-core.c       |    3 +++
 block/blk-settings.c   |   12 ++++++++++++
 include/linux/blkdev.h |    3 +++
 3 files changed, 18 insertions(+)

diff --git a/block/blk-core.c b/block/blk-core.c
index 1f61b74..ca42fd7 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -369,6 +369,9 @@ void blk_drain_queue(struct request_queue *q, bool drain_all)
 		if (drain_all)
(Continue reading)

Ioan Raicu | 19 May 15:47
Favicon

Call for Participation: ACM HPDC 2012 -- Early registration deadline May 25th

Call for Participation

http://www.hpdc.org/2012/

The organizing committee is delighted to invite you to HPDC'12, the 21st International ACM Symposium on High-Performance Parallel and Distributed Computing, to be held in Delft, the Netherlands, which is a historic, picturesque city that is less than one hour away from Amsterdam-Schiphol airport.

HPDC is the premier annual conference on the design, the implementation, the evaluation, and the use of parallel and distributed systems for high-end computing. HPDC is sponsored by SIGARCH, the Special Interest Group on Computer Architecture of the Association for Computing Machinery.

HPDC'12 will be held at Delft University of Technology, with the main conference taking place on June 20-22 (Wednesday to Friday 1 PM), and with affiliated workshops on June 18-19 (Monday and Tuesday).

Early registration closes on May 25th, so if you plan on attending, please register now at http://www.hpdc.org/2012/registration/.

Some highlights of the conference:

  • Awards:
    • Achievement Award - Ian Foster of the University of Chicago and Argonne National Laboratory, USA
  • Keynote Speakers:
    • Mihai Budiu of Microsoft Research, Mountain View, USA.
      Title: Putting "Big-data" to Good Use: Building Kinect
    • Ricardo Bianchini of Rutgers University, USA.
      Title: "Leveraging Renewable Energy in Data Centers: Present and Future"
  • Accepted Papers:
  1.      vSlicer: Latency-aware Virtual Machine Scheduling via Differentiated-frequency CPU Slicing, Cong Xu (Purdue University), Sahan Gamage (Purdue University), Pawan N. Rao (Purdue University), Ardalan Kangarlou (NetApp), Ramana Kompella (Purdue University), Dongyan Xu (Purdue University)
  2.      Singleton: System-wide Page Deduplication in Virtual Environments, Prateek Sharma, Purushottam Kulkarni (IIT Bombay)
  3.      Locality-aware Dynamic VM Reconfiguration on MapReduce Clouds, Jongse Park, Daewoo Lee, Bokyeong Kim, Jaehyuk Huh, Seungryoul Maeng (KAIST)
  4.      Achieving Application-Centric Performance Targets via Consolidation on Multicores: Myth or Reality?, Lydia Y. Chen Chen (IBM Research Zurich Lab), Danilo Ansaloni (University of Lugano), Evgenia Smirni (College of William and Mary), Akira Yokokawa (University of Lugano), Walter Binder (University of Lugano)
  5.      Enabling Event Tracing at Leadership-Class Scale through I/O Forwarding Middleware, Thomas Ilsche (Technische Universität Dresden), Joseph Schuchart (Technische Universität Dresden), Jason Cope (Argonne National Laboratory), Dries Kimpe (Argonne National Laboratory), Terry Jones (Oak Ridge National Laboratory), Andreas Knöpfer (Technische Universität Dresden), Kamil Iskra (Argonne National Laboratory), Robert Ross (Argonne National Laboratory), Wolfgang E. Nagel (Technische Universität Dresden), Stephen Poole (Oak Ridge National Laboratory)
  6.      ISOBAR Hybrid Compression-I/O Interleaving for Large-scale Parallel I/O Optimization, Eric R. Schendel (North Carolina State University), Saurabh V. Pendse (North Carolina State University), John Jenkins (North Carolina State University), David A. Boyuka (North Carolina State University), Zhenhuan Gong (North Carolina State University), Sriram Lakshminarasimhan (North Carolina State University), Qing Liu (Oak Ridge National Laboratory), Scott Klasky (Oak Ridge National Laboratory), Robert Ross (Argonne National Laboratory), Nagiza F. Samatova (North Carolina State University)
  7.      QBox: Guaranteeing I/O Performance on Black Box Storage Systems, Dimitris Skourtis, Shinpei Kato, Scott Brandt (University of California, Santa Cruz)
  8.      Towards Efficient Live Migration of I/O Intensive Workloads: A Transparent Storage Transfer Propo, Bogdan Nicolae (INRIA), Franck Cappello (INRIA/UIUC)
  9.      A Virtual Memory Based Runtime to Support Multi-tenancy in Clusters with GPUs, Michela Becchi (University of Missouri), Kittisak Sajjapongse (University of Missouri), Ian Graves (University of Missouri), Adam Procter (University of Missouri), Vignesh Ravi (Ohio State University), Srimat Chakradhar (NEC Laboratories America)
  10.      Interference-driven Scheduling and Resource Management for GPU-based Heterogeneous Clusters, Rajat Phull, Cheng-Hong Li, Kunal Rao, Hari Cadambi, Srimat Chakradhar (NEC Laboratories America)
  11.      Work Stealing and Persistence-based Load Balancers for Iterative Overdecomposed Applications, Jonathan Lifflander (UIUC), Sriram Krishnamoorthy (PNNL), Laxmikant V. Kale (UIUC)
  12.      Highly Scalable Graph Search for the Graph500 Benchmark, Koji Ueno (Tokyo Institute of Technology/JST CREST), Toyotaro Suzumura (Tokyo Institute of Technology/IBM Research Tokyo/JST CREST)
  13.      PonD : Dynamic Creation of HTC Pool on Demand Using a Decentralized Resource Discovery System, Kyungyong Lee (University of Florida), David Wolinsky (Yale University), Renato Figueiredo (University of Florida)
  14.      SpeQuloS: A QoS Service for BoT Applications Using Best Effort Distributed Computing Infrastructures, Simon Delamare (INRIA), Gilles Fedak (INRIA), Derrick Kondo (INRIA), Oleg Lodygensky (IN2P3)
  15.      Understanding the Effects and Implications of Compute Node Related Failures in Hadoop, Florin Dinu, T. S. Eugene Ng (Rice University)
  16.      Optimizing MapReduce for GPUs with Effective Shared Memory Usage, Linchuan Chen, Gagan Agrawal (The Ohio State University)
  17.      CAM: A Topology Aware Minimum Cost Flow Based Resource Manager for MapReduce Applications in the Cloud, Min Li (Virginia Tech), Dinesh Subhraveti (IBM Almaden Research Center), Ali Butt (Virginia Tech), Aleksandr Khasymski (Virginia Tech), Prasenjit Sarkar (IBM Almaden Research Center)
  18.      Distributed Approximate Spectral Clustering for Large-Scale Datasets, Fei Gao (Simon Fraser University), Wael Abd-Almageed (University of Maryland)
  19.      Exploring Cross-layer Power Management for PGAS Applications on the SCC Platform, Marc Gamell (Rutgers University), Ivan Rodero (Rutgers University), Manish Parashar (Rutgers University), Rajeev Muralidhar (Intel India)
  20.      Dynamic Adaptive Virtual Core Mapping to Improve Power, Energy, and Performance in Multi-socket Multicores, Chang Bae (Northwestern University), Lei Xia (Northwestern University), Peter Dinda (Northwestern University), John Lange (University of Pittsburgh)
  21.      VNET/P: Bridging the Cloud and High Performance Computing Through Fast Overlay Networking, Lei Xia (Northwestern University), Zheng Cui (University of New Mexico), John Lange (University of Pittsburgh), Yuan Tang (UESTC, China), Peter Dinda (Northwestern University), Patrick Bridges (University of New Mexico)
  22.      Massively-Parallel Stream Processing under QoS Constraints with Nephele, Björn Lohrmann, Daniel Warneke, Odej Kao (Technische Universität Berlin)
  23.      A Resiliency Model for High Performance Infrastructure Based on Logical Encapsulation, James Moore (The University of Southern California/EMC Corporation), Carl Kesselman (The University of Southern California)
  • Workshops:
    • Astro-HPC: Workshop on High-Performance Computing for Astronomy, Ana Lucia Varbanescu, Rob van Nieuwpoort, and Simon Portegies Zwart
    • ECMLS: 3rd Int'l Emerging Computational Methods for the Life Sciences Workshop, Carole Goble, Judy Qiu, and Ian Foster
    • ScienceCloud: 3rd Workshop on Scientific Cloud Computing, Yogesh Simmhan, Gabriel Antoniu, and Carole Goble
    • DIDC: Fifth Int'l Workshop on Data-Intensive Distributed Computing, Tevfik Kosar and Douglas Thain
    • MapReduce: The Third Int'l Workshop on MapReduce and its Applications, Gilles Fedak and Geoffrey Fox
    • VTDC: 6th Int'l Workshop on Virtualization Technologies in Distributed Computing, Frédéric Desprez and Adrien Lèbre 

For more information on the full program, see http://www.hpdc.org/2012/program/conference-program/.

Looking forward to seeing you in Delft!

Regards,
Ioan Raicu

-- ================================================================= Ioan Raicu, Ph.D. Assistant Professor, Illinois Institute of Technology (IIT) Guest Research Faculty, Argonne National Laboratory (ANL) ================================================================= Data-Intensive Distributed Systems Laboratory, CS/IIT Distributed Systems Laboratory, MCS/ANL ================================================================= Cel: 1-847-722-0876 Office: 1-312-567-5704 Email: iraicu <at> cs.iit.edu Web: http://www.cs.iit.edu/~iraicu/ Web: http://datasys.cs.iit.edu/ ================================================================= =================================================================
_______________________________________________
Virtualization mailing list
Virtualization <at> lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Ming Zhao | 19 May 02:44

MBDS paper submission due in one month (The International Workshop on Management of Big Data Systems)

CALL FOR PAPERS

International Workshop on Management of Big Data Systems (MBDS 2012)
http://www.cercs.gatech.edu/mbds12

In conjunction with ICAC 2012
http://icac2012.cs.fiu.edu

September 21, 2012, San Jose, CA

-----------------------------------------------------------------

IMPORTANT DATES

Paper submission due:  June 15, 2012
Author notification:   July 30, 2012
Workshop:              Sep 21, 2012

-----------------------------------------------------------------

OVERVIEW

Data is growing at an exponential rate and several systems have emerged 
to store and analyze such large amounts of data. These systems, termed 
“Big data systems” are fast evolving Examples include the NoSQL storage 
systems, Hadoop Map-Reduce, data analytics platforms, search and indexing 
platforms, and messaging infrastructures. These systems address needs for 
structured and unstructured data across a wide spectrum of domains such 
as web, social networks, enterprise, cloud, mobile, sensor networks, 
multimedia/streaming, cyberphysical and high performance systems, and 
for multiple application verticals such as biosciences, healthcare, 
transportation, public sector, energy utilities, oil & gas, and scientific 
computing. 

With increasing scale and complexity, managing these big data systems to 
cope with failures and performance problems is becoming non-trivial. 
New resource management and scheduling mechanisms are also needed for such 
systems, and so are mechanisms for tuning and support from platform layers. 
Several open source and proprietary solutions have been proposed to address 
these requirements, with extensive contributions from industry and academia. 
However, there remain substantial challenges, including those that pertain 
to such systems’ autonomic and self-management capabilities.

The objective of the MBDS workshop is to bring together researchers, 
practitioners, system administrators, system programmers, and others 
interested in sharing and presenting their perspectives on the effective 
management of big data systems. The focus of the workshop is on novel and 
practical, systems-oriented work. MBDS offers an opportunity for researchers 
and practitioners from industry, academia, and national labs to showcase the 
latest advances in this area and to also discuss and identify future directions 
and challenges in all aspects on autonomic management of big data systems.

Papers are solicited on all aspects of big data management. Specific topics 
of interest include, but are not limited, to the following:

* Autonomic and self-managing techniques

* Application-level resource management and scheduling mechanisms

* System tuning/auto-tuning and configuration management

* Performance management, fault management, and power management

* Scalability challenges

* Complexity challenges, as for composite, cross-tier systems with multiple control loops

* Unified management of ‘data in motion’ and ‘data at rest’

* Dealing with both structured and unstructured data

* Monitoring, diagnosis, and automated behaviour detection

* System-level principles and support for resource management 

* Holistic management across hardware and software

* Implications of emerging hardware technologies such as non-volatile memory

* Domain specific challenges in web, cloud, social networks, mobile, sensor networks, 
  streaming analytics, cyber-physical systems

* System building and experience papers for specific industry verticals

-----------------------------------------------------------------

PAPER SUBMISSIONS

Full papers (a maximum of 6 pages in the two-column ACM proceedings 
format) are invited on a wide variety of topics relating to management of big
data systems. Submitted papers must be original work, and may not be under 
consideration for another conference or journal. Complete formatting and 
submission instructions can be found on the workshop web site. Accepted 
papers will appear in proceedings distributed at the conference and available 
electronically. 

-----------------------------------------------------------------

WORKSHOP ORGANIZERS

Karsten Schwan, Georgia Tech
Vanish Talwar, HP Labs

PUBLICITY CHAIR

Aravind Menon, Facebook

PROGRAM COMMITTEE

Amitanand Aiyer, Facebook
Adhyas Avasthi, Nokia Research
Milind Bhandarkar, Greenplum Labs, EMC
Randal Burns, John Hopkins University
Garth Gibson, Carnegie Mellon University and Panasas Inc.
Herodotos Herodotou, Duke University
Michael A Kozuch, Intel
Kai Li, Princeton University
Mohamed Mansour, Amazon
Aravind Menon, Facebook
Arif Merchant, Google
Beth Plale, Indiana University
Indrajit Roy, HP Labs
Gabor Szabo, Twitter
Craig Ulmer, Sandia National Lab
Kushagra Vaid, Microsoft
Weikuan Yu, Auburn University
Philip Zeyliger, Cloudera
Michael S. Tsirkin | 17 May 11:35
Picon
Favicon

[PULL] virtio: last minute fixes for 3.4

The following changes since commit 0e93b4b304ae052ba1bc73f6d34a68556fe93429:

  Merge git://git.kernel.org/pub/scm/virt/kvm/kvm (2012-05-16 14:30:51 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git for_linus

for you to fetch changes up to ec13ee80145ccb95b00e6e610044bbd94a170051:

  virtio_net: invoke softirqs after __napi_schedule (2012-05-17 12:16:38 +0300)

----------------------------------------------------------------
virtio: last minute fixes for 3.4

Here are a couple of last minute virtio fixes for 3.4.
Hope it's not too late yes - I might have tried too hard
to make sure the fix is well tested.

Fixes are by Amit and myself. One fixes module removal
and one suspend of a VM, the last one the handling of out
of memory condition.
They are thus very low risk as most people never hit these paths, but do fix
very annoying problems for people that do use the feature.

Signed-off-by: Michael S. Tsirkin <mst <at> redhat.com>

----------------------------------------------------------------
Amit Shah (2):
      virtio: console: tell host of open ports after resume from s3/s4
      virtio: balloon: let host know of updated balloon size before module removal

Michael S. Tsirkin (1):
      virtio_net: invoke softirqs after __napi_schedule

 drivers/char/virtio_console.c   |    7 +++++++
 drivers/net/virtio_net.c        |    2 ++
 drivers/virtio/virtio_balloon.c |    1 +
 3 files changed, 10 insertions(+), 0 deletions(-)
Favicon

[vmw_vmci RFC 00/11] VMCI for Linux

In an effort to improve the out-of-the-box experience with Linux
kernels for VMware users, VMware is working on readying the Virtual
Machine Communication Interface (vmw_vmci) and VMCI Sockets (vmw_vsock) kernel
modules for inclusion in the Linux kernel. The purpose of this post
is to acquire feedback on the vmw_vmci kernel module. The vmw_vsock
kernel module will be presented in a later post.

VMCI allows virtual machines to communicate with host kernel modules
and the VMware hypervisors. User level applications both in a virtual
machine and on the host can use vmw_vmci through VMCI Sockets, a socket
address family designed to be compatible with UDP and TCP at the
interface level. Today, VMCI and VMCI Sockets are used by the VMware
shared folders (HGFS) and various VMware Tools components inside the
guest for zero-config, network-less access to VMware host services. In
addition to this, VMware's users are using VMCI Sockets for various
applications, where network access of the virtual machine is
restricted or non-existent. Examples of this are VMs communicating
with device proxies for proprietary hardware running as host
applications and automated testing of applications running within
virtual machines.

In a virtual machine, VMCI is exposed as a regular PCI device. The
primary communication mechanisms supported are a point-to-point
bidirectional transport based on a pair of memory-mapped queues, and
asynchronous notifications in the form of datagrams and
doorbells. These features are available to kernel level components
such as HGFS and VMCI Sockets through the VMCI kernel API. In addition
to this, the VMCI kernel API provides support for receiving events
related to the state of the VMCI communication channels, and the
virtual machine itself.

Outside the virtual machine, the host side support of the VMCI kernel
module makes the same VMCI kernel API available to VMCI endpoints on
the host. In addition to this, the host side manages each VMCI device
in a virtual machine through a context object. This context object
serves to identify the virtual machine for communication, and to track
the resource consumption of the given VMCI device. Both operations
related to communication between the virtual machine and the host
kernel, and those related to the management of the VMCI device state
in the host kernel, are invoked by the user level component of the
hypervisor through a set of ioctls on the VMCI device node.  To
provide seamless support for nested virtualization, where a virtual
machine may use both a VMCI PCI device to talk to its hypervisor, and
the VMCI host side support to run nested virtual machines, the VMCI
host and virtual machine support are combined in a single kernel
module.

For additional information about the use of VMCI and in particular
VMCI Sockets, please refer to the VMCI Socket Programming Guide
available at https://www.vmware.com/support/developer/vmci-sdk/.

Andrew Stiegmann (stieg) (11):
  Apply VMCI context code
  Apply VMCI datagram code
  Apply VMCI doorbell code
  Apply VMCI driver code
  Apply VMCI event code
  Apply dynamic array code
  Apply VMCI hash table
  Apply VMCI queue pairs
  Apply VMCI resource code
  Apply vmci routing code
  Apply the header code to make VMCI build

 drivers/misc/Kconfig                      |    1 +
 drivers/misc/Makefile                     |    1 +
 drivers/misc/vmw_vmci/Kconfig             |   16 +
 drivers/misc/vmw_vmci/Makefile            |   43 +
 drivers/misc/vmw_vmci/vmci_common_int.h   |   72 +
 drivers/misc/vmw_vmci/vmci_context.c      | 1743 +++++++++++
 drivers/misc/vmw_vmci/vmci_context.h      |  150 +
 drivers/misc/vmw_vmci/vmci_datagram.c     |  760 +++++
 drivers/misc/vmw_vmci/vmci_datagram.h     |   57 +
 drivers/misc/vmw_vmci/vmci_doorbell.c     |  989 +++++++
 drivers/misc/vmw_vmci/vmci_doorbell.h     |   57 +
 drivers/misc/vmw_vmci/vmci_driver.c       | 2875 ++++++++++++++++++
 drivers/misc/vmw_vmci/vmci_driver.h       |   52 +
 drivers/misc/vmw_vmci/vmci_event.c        |  614 ++++
 drivers/misc/vmw_vmci/vmci_event.h        |   29 +
 drivers/misc/vmw_vmci/vmci_handle_array.c |  300 ++
 drivers/misc/vmw_vmci/vmci_handle_array.h |   50 +
 drivers/misc/vmw_vmci/vmci_hash_table.c   |  494 ++++
 drivers/misc/vmw_vmci/vmci_hash_table.h   |   56 +
 drivers/misc/vmw_vmci/vmci_queue_pair.c   | 4517 +++++++++++++++++++++++++++++
 drivers/misc/vmw_vmci/vmci_queue_pair.h   |  258 ++
 drivers/misc/vmw_vmci/vmci_resource.c     |  320 ++
 drivers/misc/vmw_vmci/vmci_resource.h     |   61 +
 drivers/misc/vmw_vmci/vmci_route.c        |  234 ++
 drivers/misc/vmw_vmci/vmci_route.h        |   34 +
 include/linux/vmw_vmci_api.h              |  103 +
 include/linux/vmw_vmci_defs.h             | 1003 +++++++
 27 files changed, 14889 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/vmw_vmci/Kconfig
 create mode 100644 drivers/misc/vmw_vmci/Makefile
 create mode 100644 drivers/misc/vmw_vmci/vmci_common_int.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_context.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_context.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_datagram.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_datagram.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_doorbell.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_doorbell.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_driver.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_driver.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_event.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_event.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_handle_array.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_handle_array.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_hash_table.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_hash_table.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_queue_pair.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_queue_pair.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_resource.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_resource.h
 create mode 100644 drivers/misc/vmw_vmci/vmci_route.c
 create mode 100644 drivers/misc/vmw_vmci/vmci_route.h
 create mode 100644 include/linux/vmw_vmci_api.h
 create mode 100644 include/linux/vmw_vmci_defs.h
Michael S. Tsirkin | 16 May 09:57
Picon
Favicon

[PATCH] virtio_net: invoke softirqs after __napi_schedule

__napi_schedule might raise softirq but nothing
causes do_softirq to trigger, so it does not in fact
run. As a result,
the error message "NOHZ: local_softirq_pending 08"
sometimes occurs during boot of a KVM guest when the network service is
started and we are oom:

  ...
  Bringing up loopback interface:  [  OK  ]
  Bringing up interface eth0:
  Determining IP information for eth0...NOHZ: local_softirq_pending 08
   done.
  [  OK  ]
  ...

Further, receive queue processing might get delayed
indefinitely until some interrupt triggers:
virtio_net expected napi to be run immediately.

One way to cause do_softirq to be executed is by
invoking local_bh_enable(). As __napi_schedule is
normally called from bh or irq context, this
seems to make sense: disable bh before __napi_schedule
and enable afterwards.

Reported-by: Ulrich Obergfell <uobergfe <at> redhat.com>
Tested-by: Ulrich Obergfell <uobergfe <at> redhat.com>
Signed-off-by: Michael S. Tsirkin <mst <at> redhat.com>
---

To test, one can hack try_fill_recv to always report oom.
I'm not sure it's not too late for 3.4, but we can try.
Rusty, could you review ASAP pls?

 drivers/net/virtio_net.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index af8acc8..cbefe67 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -492,7 +492,9 @@ static void virtnet_napi_enable(struct virtnet_info *vi)
 	 * We synchronize against interrupts via NAPI_STATE_SCHED */
 	if (napi_schedule_prep(&vi->napi)) {
 		virtqueue_disable_cb(vi->rvq);
+		local_bh_disable();
 		__napi_schedule(&vi->napi);
+		local_bh_enable();
 	}
 }

--

-- 
MST
Pawel Moll | 9 May 19:30
Favicon

[PATCH] virtio-mmio: Devices parameter parsing

This patch adds an option to instantiate guest virtio-mmio devices
basing on a kernel command line (or module) parameter, for example:

	virtio_mmio.devices=0x100 <at> 0x100b0000:48

Signed-off-by: Pawel Moll <pawel.moll <at> arm.com>
---

Hi Rusty,

As the param changes are in now, could you queue this
long-time-forgotten patch for 3.5?

Cheers!

Pawel

PS. Congratulations once again and see you in HK.

 Documentation/kernel-parameters.txt |   17 ++++
 drivers/virtio/Kconfig              |   11 +++
 drivers/virtio/virtio_mmio.c        |  163 +++++++++++++++++++++++++++++++++++
 3 files changed, 191 insertions(+), 0 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index c1601e5..8b35051 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -110,6 +110,7 @@ parameter is applicable:
 	USB	USB support is enabled.
 	USBHID	USB Human Interface Device support is enabled.
 	V4L	Video For Linux support is enabled.
+	VMMIO   Driver for memory mapped virtio devices is enabled.
 	VGA	The VGA console has been enabled.
 	VT	Virtual terminal support is enabled.
 	WDT	Watchdog support is enabled.
@@ -2847,6 +2848,22 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 	video=		[FB] Frame buffer configuration
 			See Documentation/fb/modedb.txt.

+	virtio_mmio.device=
+			[VMMIO] Memory mapped virtio (platform) device.
+
+				<size>@<baseaddr>:<irq>[:<id>]
+			where:
+				<size>     := size (can use standard suffixes
+						like K, M and G)
+				<baseaddr> := physical base address
+				<irq>      := interrupt number (as passed to
+						request_irq())
+				<id>       := (optional) platform device id
+			example:
+				virtio_mmio.device=1K <at> 0x100b0000:48:7
+
+			Can be used multiple times for multiple devices.
+
 	vga=		[BOOT,X86-32] Select a particular video mode
 			See Documentation/x86/boot.txt and
 			Documentation/svga.txt.
diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig
index 1a61939..f38b17a 100644
--- a/drivers/virtio/Kconfig
+++ b/drivers/virtio/Kconfig
@@ -46,4 +46,15 @@ config VIRTIO_BALLOON

  	 If unsure, say N.

+config VIRTIO_MMIO_CMDLINE_DEVICES
+	bool "Memory mapped virtio devices parameter parsing"
+	depends on VIRTIO_MMIO
+	---help---
+	 Allow virtio-mmio devices instantiation via the kernel command line
+	 or module parameters. Be aware that using incorrect parameters (base
+	 address in particular) can crash your system - you have been warned.
+	 See Documentation/kernel-parameters.txt for details.
+
+	 If unsure, say 'N'.
+
 endmenu
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 01d6dc2..453db0c 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -6,6 +6,50 @@
  * This module allows virtio devices to be used over a virtual, memory mapped
  * platform device.
  *
+ * The guest device(s) may be instantiated in one of three equivalent ways:
+ *
+ * 1. Static platform device in board's code, eg.:
+ *
+ *	static struct platform_device v2m_virtio_device = {
+ *		.name = "virtio-mmio",
+ *		.id = -1,
+ *		.num_resources = 2,
+ *		.resource = (struct resource []) {
+ *			{
+ *				.start = 0x1001e000,
+ *				.end = 0x1001e0ff,
+ *				.flags = IORESOURCE_MEM,
+ *			}, {
+ *				.start = 42 + 32,
+ *				.end = 42 + 32,
+ *				.flags = IORESOURCE_IRQ,
+ *			},
+ *		}
+ *	};
+ *
+ * 2. Device Tree node, eg.:
+ *
+ *		virtio_block <at> 1e000 {
+ *			compatible = "virtio,mmio";
+ *			reg = <0x1e000 0x100>;
+ *			interrupts = <42>;
+ *		}
+ *
+ * 3. Kernel module (or command line) parameter. Can be used more than once -
+ *    one device will be created for each one. Syntax:
+ *
+ *		[virtio_mmio.]device=<size>@<baseaddr>:<irq>[:<id>]
+ *    where:
+ *		<size>     := size (can use standard suffixes like K, M or G)
+ *		<baseaddr> := physical base address
+ *		<irq>      := interrupt number (as passed to request_irq())
+ *		<id>       := (optional) platform device id
+ *    eg.:
+ *		virtio_mmio.device=0x100 <at> 0x100b0000:48 \
+ *				virtio_mmio.device=1K <at> 0x1001e000:74
+ *
+ *
+ *
  * Registers layout (all 32-bit wide):
  *
  * offset d. name             description
@@ -42,6 +86,8 @@
  * See the COPYING file in the top-level directory.
  */

+#define pr_fmt(fmt) "virtio-mmio: " fmt
+
 #include <linux/highmem.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
@@ -449,6 +495,122 @@ static int __devexit virtio_mmio_remove(struct platform_device *pdev)

 

+/* Devices list parameter */
+
+#if defined(CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES)
+
+static struct device vm_cmdline_parent = {
+	.init_name = "virtio-mmio-cmdline",
+};
+
+static int vm_cmdline_parent_registered;
+static int vm_cmdline_id;
+
+static int vm_cmdline_set(const char *device,
+		const struct kernel_param *kp)
+{
+	int err;
+	struct resource resources[2] = {};
+	char *str;
+	long long int base;
+	int processed, consumed = 0;
+	struct platform_device *pdev;
+
+	resources[0].flags = IORESOURCE_MEM;
+	resources[1].flags = IORESOURCE_IRQ;
+
+	resources[0].end = memparse(device, &str) - 1;
+
+	processed = sscanf(str, "@%lli:%u%n:%d%n",
+			&base, &resources[1].start, &consumed,
+			&vm_cmdline_id, &consumed);
+
+	if (processed < 2 || processed > 3 || str[consumed])
+		return -EINVAL;
+
+	resources[0].start = base;
+	resources[0].end += base;
+	resources[1].end = resources[1].start;
+
+	if (!vm_cmdline_parent_registered) {
+		err = device_register(&vm_cmdline_parent);
+		if (err) {
+			pr_err("Failed to register parent device!\n");
+			return err;
+		}
+		vm_cmdline_parent_registered = 1;
+	}
+
+	pr_info("Registering device virtio-mmio.%d at 0x%llx-0x%llx, IRQ %d.\n",
+		       vm_cmdline_id,
+		       (unsigned long long)resources[0].start,
+		       (unsigned long long)resources[0].end,
+		       (int)resources[1].start);
+
+	pdev = platform_device_register_resndata(&vm_cmdline_parent,
+			"virtio-mmio", vm_cmdline_id++,
+			resources, ARRAY_SIZE(resources), NULL, 0);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return 0;
+}
+
+static int vm_cmdline_get_device(struct device *dev, void *data)
+{
+	char *buffer = data;
+	unsigned int len = strlen(buffer);
+	struct platform_device *pdev = to_platform_device(dev);
+
+	snprintf(buffer + len, PAGE_SIZE - len, "0x%llx <at> 0x%llx:%llu:%d\n",
+			pdev->resource[0].end - pdev->resource[0].start + 1ULL,
+			(unsigned long long)pdev->resource[0].start,
+			(unsigned long long)pdev->resource[1].start,
+			pdev->id);
+	return 0;
+}
+
+static int vm_cmdline_get(char *buffer, const struct kernel_param *kp)
+{
+	buffer[0] = '\0';
+	device_for_each_child(&vm_cmdline_parent, buffer,
+			vm_cmdline_get_device);
+	return strlen(buffer) + 1;
+}
+
+static struct kernel_param_ops vm_cmdline_param_ops = {
+	.set = vm_cmdline_set,
+	.get = vm_cmdline_get,
+};
+
+device_param_cb(device, &vm_cmdline_param_ops, NULL, S_IRUSR);
+
+static int vm_unregister_cmdline_device(struct device *dev,
+		void *data)
+{
+	platform_device_unregister(to_platform_device(dev));
+
+	return 0;
+}
+
+static void vm_unregister_cmdline_devices(void)
+{
+	if (vm_cmdline_parent_registered) {
+		device_for_each_child(&vm_cmdline_parent, NULL,
+				vm_unregister_cmdline_device);
+		device_unregister(&vm_cmdline_parent);
+		vm_cmdline_parent_registered = 0;
+	}
+}
+
+#else
+
+static void vm_unregister_cmdline_devices(void)
+{
+}
+
+#endif
+
 /* Platform driver */

 static struct of_device_id virtio_mmio_match[] = {
@@ -475,6 +637,7 @@ static int __init virtio_mmio_init(void)
 static void __exit virtio_mmio_exit(void)
 {
 	platform_driver_unregister(&virtio_mmio_driver);
+	vm_unregister_cmdline_devices();
 }

 module_init(virtio_mmio_init);
--

-- 
1.7.5.4
Michael S. Tsirkin | 7 May 07:30
Picon
Favicon

virtio 3.4 patches

Hi Rusty, please also pick two fixes from for_linus tag on my tree
I think they should be sent to Linus for 3.4:

http://git.kernel.org/?p=linux/kernel/git/mst/vhost.git;a=tag;h=refs/tags/for_linus

git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git refs/tags/for_linus

--

-- 
MST

Gmane