Re: [PATCH v3 0/2] shrink virtio baloon on OOM in guest

2014-10-19 Thread Michael S. Tsirkin
On Wed, Oct 15, 2014 at 07:47:42PM +0400, Denis V. Lunev wrote: > Excessive virtio_balloon inflation can cause invocation of OOM-killer, when > Linux is under severe memory pressure. Various mechanisms are responsible for > correct virtio_balloon memory management. Nevertheless it is often the case

[PATCH RFC v3 1/3] virtio_net: enable tx interrupt

2014-10-19 Thread Michael S. Tsirkin
On newer hosts that support delayed tx interrupts, we probably don't have much to gain from orphaning packets early. Based on patch by Jason Wang. Note: this might degrade performance for hosts without event idx support. Should be addressed by the next patch. Signed-off-by: Michael S. Tsirkin -

[PATCH RFC v3 2/3] virtio_net: bql

2014-10-19 Thread Michael S. Tsirkin
Improve tx batching using byte queue limits. Should be especially effective for MQ. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 14f4cda..b83d39d 100644 --- a/dr

[PATCH RFC v3 3/3] virtio-net: optimize free_old_xmit_skbs stats

2014-10-19 Thread Michael S. Tsirkin
From: Jason Wang We already have counters for sent packets and sent bytes. Use them to reduce the number of u64_stats_update_begin/end(). Take care not to bother with stats update when called speculatively. Based on a patch by Jason Wang. Cc: Rusty Russell Signed-off-by: Jason Wang Signed-of

Re: [PATCH v2 3/6] hw_random: use reference counts on each struct hwrng.

2014-10-19 Thread Amos Kong
On Mon, Oct 20, 2014 at 10:42:11AM +1030, Rusty Russell wrote: > Amos Kong writes: > > We got a warning in boot stage when above set_current_rng() is executed, > > it can be fixed by init rng->ref in hwrng_init(). > > > > > > @@ -166,6 +169,8 @@ static inline int hwrng_init(struct hwrng *rng) > >

Re: [PATCH 2/2] virtio_balloon: free some memory from balloon on OOM

2014-10-19 Thread Rusty Russell
"Denis V. Lunev" writes: > From: Raushaniya Maksudova > > Excessive virtio_balloon inflation can cause invocation of OOM-killer, > when Linux is under severe memory pressure. Various mechanisms are > responsible for correct virtio_balloon memory management. Nevertheless > it is often the case th

Re: [PATCH v2 3/6] hw_random: use reference counts on each struct hwrng.

2014-10-19 Thread Rusty Russell
Amos Kong writes: > From: Rusty Russell > > current_rng holds one reference, and we bump it every time we want > to do a read from it. > > This means we only hold the rng_mutex to grab or drop a reference, > so accessing /sys/devices/virtual/misc/hw_random/rng_current doesn't > block on read of /

Re: [PATCH v2 3/6] hw_random: use reference counts on each struct hwrng.

2014-10-19 Thread Rusty Russell
Amos Kong writes: > We got a warning in boot stage when above set_current_rng() is executed, > it can be fixed by init rng->ref in hwrng_init(). > > > @@ -166,6 +169,8 @@ static inline int hwrng_init(struct hwrng *rng) > if (current_quality > 0 && !hwrng_fill) > start_khwrn