Re: [PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker

2018-08-02 Thread Wei Wang
On 08/02/2018 07:47 PM, Michal Hocko wrote: On Thu 02-08-18 18:32:44, Wei Wang wrote: On 08/01/2018 07:34 PM, Michal Hocko wrote: On Wed 01-08-18 19:12:25, Wei Wang wrote: On 07/30/2018 05:00 PM, Michal Hocko wrote: On Fri 27-07-18 17:24:55, Wei Wang wrote: The OOM notifier is getting

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Toshiaki Makita
On 2018/08/03 14:07, Jason Wang wrote: > On 2018年08月03日 12:04, Tonghao Zhang wrote: >> On Fri, Aug 3, 2018 at 11:43 AM Jason Wang  wrote: >>> >>> On 2018年08月03日 11:24, Tonghao Zhang wrote: On Fri, Aug 3, 2018 at 11:07 AM Jason Wang  wrote: > On 2018年08月03日 10:51, Tonghao Zhang wrote:

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Jason Wang
On 2018年08月03日 12:04, Tonghao Zhang wrote: On Fri, Aug 3, 2018 at 11:43 AM Jason Wang wrote: On 2018年08月03日 11:24, Tonghao Zhang wrote: On Fri, Aug 3, 2018 at 11:07 AM Jason Wang wrote: On 2018年08月03日 10:51, Tonghao Zhang wrote: On Thu, Aug 2, 2018 at 5:23 PM Jason Wang wrote: On

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Toshiaki Makita
On 2018/08/03 13:14, Tonghao Zhang wrote: > On Fri, Aug 3, 2018 at 11:40 AM Toshiaki Makita > wrote: >> >> On 2018/08/03 12:24, Tonghao Zhang wrote: >>> On Fri, Aug 3, 2018 at 11:07 AM Jason Wang wrote: On 2018年08月03日 10:51, Tonghao Zhang wrote: > On Thu, Aug 2, 2018 at 5:23 PM Jason

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Tonghao Zhang
On Fri, Aug 3, 2018 at 11:40 AM Toshiaki Makita wrote: > > On 2018/08/03 12:24, Tonghao Zhang wrote: > > On Fri, Aug 3, 2018 at 11:07 AM Jason Wang wrote: > >> On 2018年08月03日 10:51, Tonghao Zhang wrote: > >>> On Thu, Aug 2, 2018 at 5:23 PM Jason Wang wrote: > On 2018年08月02日 16:41, Toshiaki

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Tonghao Zhang
On Fri, Aug 3, 2018 at 11:43 AM Jason Wang wrote: > > > > On 2018年08月03日 11:24, Tonghao Zhang wrote: > > On Fri, Aug 3, 2018 at 11:07 AM Jason Wang wrote: > >> > >> > >> On 2018年08月03日 10:51, Tonghao Zhang wrote: > >>> On Thu, Aug 2, 2018 at 5:23 PM Jason Wang wrote: > > On

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Jason Wang
On 2018年08月03日 11:32, Toshiaki Makita wrote: On 2018/08/03 12:07, Jason Wang wrote: On 2018年08月02日 17:23, Jason Wang wrote: No need to enable rx virtqueue, if we are sure handle_rx() will be called soon. If we disable rx virtqueue in handle_tx and don't send packets from guest

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Toshiaki Makita
On 2018/08/03 12:24, Tonghao Zhang wrote: > On Fri, Aug 3, 2018 at 11:07 AM Jason Wang wrote: >> On 2018年08月03日 10:51, Tonghao Zhang wrote: >>> On Thu, Aug 2, 2018 at 5:23 PM Jason Wang wrote: On 2018年08月02日 16:41, Toshiaki Makita wrote: > On 2018/08/02 17:18, Jason Wang wrote: >>

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Toshiaki Makita
On 2018/08/03 12:07, Jason Wang wrote: > On 2018年08月02日 17:23, Jason Wang wrote: >>> >> No need to enable rx virtqueue, if we are sure handle_rx() will be >> called soon. > If we disable rx virtqueue in handle_tx and don't send packets from > guest anymore(handle_tx is not

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Tonghao Zhang
On Fri, Aug 3, 2018 at 11:07 AM Jason Wang wrote: > > > > On 2018年08月03日 10:51, Tonghao Zhang wrote: > > On Thu, Aug 2, 2018 at 5:23 PM Jason Wang wrote: > >> > >> > >> On 2018年08月02日 16:41, Toshiaki Makita wrote: > >>> On 2018/08/02 17:18, Jason Wang wrote: > On 2018年08月01日 17:52, Tonghao

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Jason Wang
On 2018年08月03日 10:51, Tonghao Zhang wrote: On Thu, Aug 2, 2018 at 5:23 PM Jason Wang wrote: On 2018年08月02日 16:41, Toshiaki Makita wrote: On 2018/08/02 17:18, Jason Wang wrote: On 2018年08月01日 17:52, Tonghao Zhang wrote: +static void vhost_net_busy_poll_check(struct vhost_net *net, +

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Jason Wang
On 2018年08月02日 17:23, Jason Wang wrote: No need to enable rx virtqueue, if we are sure handle_rx() will be called soon. If we disable rx virtqueue in handle_tx and don't send packets from guest anymore(handle_tx is not called), so we can wake up for sock rx. so the network is broken. Not

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Tonghao Zhang
On Thu, Aug 2, 2018 at 5:23 PM Jason Wang wrote: > > > > On 2018年08月02日 16:41, Toshiaki Makita wrote: > > On 2018/08/02 17:18, Jason Wang wrote: > >> On 2018年08月01日 17:52, Tonghao Zhang wrote: > +static void vhost_net_busy_poll_check(struct vhost_net *net, > +

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Jason Wang
On 2018年08月03日 04:55, Michael S. Tsirkin wrote: On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: This patch series is the follow up on the discussions we had before about the RFC titled [RFC,V2] virtio: Add platform specific DMA API translation for virito devices

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Jason Wang
On 2018年08月02日 17:57, Toshiaki Makita wrote: On 2018/08/02 18:23, Jason Wang wrote: On 2018年08月02日 16:41, Toshiaki Makita wrote: On 2018/08/02 17:18, Jason Wang wrote: On 2018年08月01日 17:52, Tonghao Zhang wrote: +static void vhost_net_busy_poll_check(struct vhost_net *net, + 

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 04:13:09PM -0500, Benjamin Herrenschmidt wrote: > On Thu, 2018-08-02 at 23:52 +0300, Michael S. Tsirkin wrote: > > > Yes, this is the purpose of Anshuman original patch (I haven't looked > > > at the details of the patch in a while but that's what I told him to > > >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Benjamin Herrenschmidt
On Thu, 2018-08-02 at 23:52 +0300, Michael S. Tsirkin wrote: > > Yes, this is the purpose of Anshuman original patch (I haven't looked > > at the details of the patch in a while but that's what I told him to > > implement ;-) : > > > > - Make virtio always use DMA ops to simplify the code path

Re: [net-next, v6, 6/7] net-sysfs: Add interface for Rx queue(s) map per Tx queue

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 02:04:12PM -0700, Nambiar, Amritha wrote: > On 8/1/2018 5:11 PM, Andrei Vagin wrote: > > On Tue, Jul 10, 2018 at 07:28:49PM -0700, Nambiar, Amritha wrote: > >> With this patch series, I introduced static_key for XPS maps > >> (xps_needed), so static_key_slow_inc() is used

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: > This patch series is the follow up on the discussions we had before about > the RFC titled [RFC,V2] virtio: Add platform specific DMA API translation > for virito devices (https://patchwork.kernel.org/patch/10417371/). There >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 10:33:05AM -0500, Benjamin Herrenschmidt wrote: > On Thu, 2018-08-02 at 00:56 +0300, Michael S. Tsirkin wrote: > > > but it's not, VMs are > > > created in "legacy" mode all the times and we don't know at VM creation > > > time whether it will become a secure VM or not. The

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 12:53:41PM -0500, Benjamin Herrenschmidt wrote: > On Thu, 2018-08-02 at 20:19 +0300, Michael S. Tsirkin wrote: > > > > I see. So yes, given that device does not know or care, using > > virtio features is an awkward fit. > > > > So let's say as a quick fix for you maybe we

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Benjamin Herrenschmidt
On Thu, 2018-08-02 at 20:19 +0300, Michael S. Tsirkin wrote: > > I see. So yes, given that device does not know or care, using > virtio features is an awkward fit. > > So let's say as a quick fix for you maybe we could generalize the > xen_domain hack, instead of just checking xen_domain check

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 11:01:26AM -0500, Benjamin Herrenschmidt wrote: > On Thu, 2018-08-02 at 18:41 +0300, Michael S. Tsirkin wrote: > > > > > I don't completely agree: > > > > > > 1 - VIRTIO_F_IOMMU_PLATFORM is a property of the "other side", ie qemu > > > for example. It indicates that the

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Benjamin Herrenschmidt
On Thu, 2018-08-02 at 18:41 +0300, Michael S. Tsirkin wrote: > > > I don't completely agree: > > > > 1 - VIRTIO_F_IOMMU_PLATFORM is a property of the "other side", ie qemu > > for example. It indicates that the peer bypasses the normal platform > > iommu. The platform code in the guest has no

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 10:24:57AM -0500, Benjamin Herrenschmidt wrote: > On Wed, 2018-08-01 at 01:36 -0700, Christoph Hellwig wrote: > > We just need to figure out how to deal with devices that deviate > > from the default. One things is that VIRTIO_F_IOMMU_PLATFORM really > > should become

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Benjamin Herrenschmidt
On Thu, 2018-08-02 at 00:56 +0300, Michael S. Tsirkin wrote: > > but it's not, VMs are > > created in "legacy" mode all the times and we don't know at VM creation > > time whether it will become a secure VM or not. The way our secure VMs > > work is that they start as a normal VM, load a secure

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Benjamin Herrenschmidt
On Wed, 2018-08-01 at 01:36 -0700, Christoph Hellwig wrote: > We just need to figure out how to deal with devices that deviate > from the default. One things is that VIRTIO_F_IOMMU_PLATFORM really > should become VIRTIO_F_PLATFORM_DMA to cover the cases of non-iommu > dma tweaks (offsets, cache

Re: [PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 06:32:44PM +0800, Wei Wang wrote: > On 08/01/2018 07:34 PM, Michal Hocko wrote: > > On Wed 01-08-18 19:12:25, Wei Wang wrote: > > > On 07/30/2018 05:00 PM, Michal Hocko wrote: > > > > On Fri 27-07-18 17:24:55, Wei Wang wrote: > > > > > The OOM notifier is getting deprecated

Re: [PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker

2018-08-02 Thread Michal Hocko
On Thu 02-08-18 18:32:44, Wei Wang wrote: > On 08/01/2018 07:34 PM, Michal Hocko wrote: > > On Wed 01-08-18 19:12:25, Wei Wang wrote: > > > On 07/30/2018 05:00 PM, Michal Hocko wrote: > > > > On Fri 27-07-18 17:24:55, Wei Wang wrote: > > > > > The OOM notifier is getting deprecated to use for the

Re: [PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker

2018-08-02 Thread Tetsuo Handa
On 2018/08/02 19:32, Wei Wang wrote: > On 08/01/2018 07:34 PM, Michal Hocko wrote: >> Do you have any numbers for how does this work in practice? > > It works in this way: for example, we can set the parameter, > balloon_pages_to_shrink, > to shrink 1GB memory once shrink scan is called. Now, we

CFP ICEIS 2019 - 21st Int.l Conf. on Enterprise Information Systems (Heraklion, Crete/Greece)

2018-08-02 Thread ic...@insticc.info
SUBMISSION DEADLINE 21st International Conference on Enterprise Information Systems Submission Deadline: December 10, 2018 http://www.iceis.org/ May 3 - 5, 2019 Heraklion, Crete, Greece. ICEIS is organized in 6 major tracks: - Databases and Information Systems Integration - Artificial

CFP CLOSER 2019 - 8th Int.l Conf. on Cloud Computing and Services Science (Heraklion, Crete/Greece)

2018-08-02 Thread clo...@insticc.info
SUBMISSION DEADLINE 8th International Conference on Cloud Computing and Services Science Submission Deadline: December 10, 2018 http://closer.scitevents.org May 2 - 4, 2019 Heraklion, Crete, Greece. CLOSER is organized in 9 major tracks: - Services Science - Data as a Service - Cloud

CFP VEHITS 2019 - 5th Int.l Conf. on Vehicle Technology and Intelligent Transport Systems (Heraklion, Crete/Greece)

2018-08-02 Thread veh...@insticc.info
SUBMISSION DEADLINE 5th International Conference on Vehicle Technology and Intelligent Transport Systems Submission Deadline: December 10, 2018 http://www.vehits.org/ May 3 - 5, 2019 Heraklion, Crete, Greece. VEHITS is organized in 5 major tracks: - Intelligent Vehicle Technologies -

CFP SMARTGREENS 2019 - 8th Int.l Conf. on Smart Cities and Green ICT Systems (Heraklion, Crete/Greece)

2018-08-02 Thread smartgre...@insticc.info
SUBMISSION DEADLINE 8th International Conference on Smart Cities and Green ICT Systems Submission Deadline: December 10, 2018 http://www.smartgreens.org/ May 3 - 5, 2019 Heraklion, Crete, Greece. SMARTGREENS is organized in 5 major tracks: - Energy-Aware Systems and Technologies -

CFP IoTBDS 2019 - 3rd Int.l Conf. on Internet of Things, Big Data and Security (Heraklion, Crete/Greece)

2018-08-02 Thread iot...@insticc.info
SUBMISSION DEADLINE 3rd International Conference on Internet of Things, Big Data and Security Submission Deadline: December 10, 2018 http://iotbds.org/ May 2 - 4, 2019 Heraklion, Crete, Greece. IoTBDS is organized in 7 major tracks: - Big Data Research - Emerging Services and Analytics

CFP SENSORNETS 2019 - 8th Int.l Conf. on Sensor Networks (Prague/Czech Republic)

2018-08-02 Thread sensorn...@insticc.info
SUBMISSION DEADLINE 8th International Conference on Sensor Networks Submission Deadline: October 1, 2018 http://www.sensornets.org/ February 26 - 27, 2019 Prague, Czech Republic. SENSORNETS is organized in 5 major tracks: - Sensor Networks Software, Architectures and Applications -

Re: [PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker

2018-08-02 Thread Michal Hocko
On Thu 02-08-18 19:27:40, Wei Wang wrote: > On 08/02/2018 07:00 PM, Tetsuo Handa wrote: > > On 2018/08/02 19:32, Wei Wang wrote: > > > On 08/01/2018 07:34 PM, Michal Hocko wrote: > > > > Do you have any numbers for how does this work in practice? > > > It works in this way: for example, we can set

Re: [PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker

2018-08-02 Thread Wei Wang
On 08/02/2018 07:00 PM, Tetsuo Handa wrote: On 2018/08/02 19:32, Wei Wang wrote: On 08/01/2018 07:34 PM, Michal Hocko wrote: Do you have any numbers for how does this work in practice? It works in this way: for example, we can set the parameter, balloon_pages_to_shrink, to shrink 1GB memory

Re: [PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker

2018-08-02 Thread Wei Wang
On 08/01/2018 07:34 PM, Michal Hocko wrote: On Wed 01-08-18 19:12:25, Wei Wang wrote: On 07/30/2018 05:00 PM, Michal Hocko wrote: On Fri 27-07-18 17:24:55, Wei Wang wrote: The OOM notifier is getting deprecated to use for the reasons mentioned here by Michal Hocko:

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Toshiaki Makita
On 2018/08/02 18:23, Jason Wang wrote: > On 2018年08月02日 16:41, Toshiaki Makita wrote: >> On 2018/08/02 17:18, Jason Wang wrote: >>> On 2018年08月01日 17:52, Tonghao Zhang wrote: > +static void vhost_net_busy_poll_check(struct vhost_net *net, > +   struct

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Jason Wang
On 2018年08月02日 16:41, Toshiaki Makita wrote: On 2018/08/02 17:18, Jason Wang wrote: On 2018年08月01日 17:52, Tonghao Zhang wrote: +static void vhost_net_busy_poll_check(struct vhost_net *net, + struct vhost_virtqueue *rvq, +

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Toshiaki Makita
On 2018/08/02 17:18, Jason Wang wrote: > On 2018年08月01日 17:52, Tonghao Zhang wrote: >>> +static void vhost_net_busy_poll_check(struct vhost_net *net, >>> + struct vhost_virtqueue *rvq, >>> + struct vhost_virtqueue *tvq, >>> +

Re: [PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-02 Thread Jason Wang
On 2018年08月01日 17:52, Tonghao Zhang wrote: + + cpu_relax(); + } + + preempt_enable(); + + if (!rx) + vhost_net_enable_vq(net, vq); No need to enable rx virtqueue, if we are sure handle_rx() will be called soon. If we disable rx virtqueue in handle_tx and