Re: [RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-19 Thread Luiz Capitulino
On Wed, 19 Dec 2012 09:55:58 -0200 Rafael Aquini wrote: > On Tue, Dec 18, 2012 at 06:17:29PM -0200, Luiz Capitulino wrote: > > Today, the balloon_lock mutex is taken and released by fill_balloon() > > and leak_balloon() when both functions are entered and when they > > return. > > > > This

Re: [RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-19 Thread Rafael Aquini
On Tue, Dec 18, 2012 at 06:17:29PM -0200, Luiz Capitulino wrote: > Today, the balloon_lock mutex is taken and released by fill_balloon() > and leak_balloon() when both functions are entered and when they > return. > > This commit moves the locking to the caller instead, which is > the balloon()

Re: [RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-19 Thread Rafael Aquini
On Tue, Dec 18, 2012 at 06:17:29PM -0200, Luiz Capitulino wrote: Today, the balloon_lock mutex is taken and released by fill_balloon() and leak_balloon() when both functions are entered and when they return. This commit moves the locking to the caller instead, which is the balloon() thread.

Re: [RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-19 Thread Luiz Capitulino
On Wed, 19 Dec 2012 09:55:58 -0200 Rafael Aquini aqu...@redhat.com wrote: On Tue, Dec 18, 2012 at 06:17:29PM -0200, Luiz Capitulino wrote: Today, the balloon_lock mutex is taken and released by fill_balloon() and leak_balloon() when both functions are entered and when they return.

[RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-18 Thread Luiz Capitulino
Today, the balloon_lock mutex is taken and released by fill_balloon() and leak_balloon() when both functions are entered and when they return. This commit moves the locking to the caller instead, which is the balloon() thread. The balloon thread is the sole caller of those functions today. The

[RFC 1/2] virtio_balloon: move locking to the balloon thread

2012-12-18 Thread Luiz Capitulino
Today, the balloon_lock mutex is taken and released by fill_balloon() and leak_balloon() when both functions are entered and when they return. This commit moves the locking to the caller instead, which is the balloon() thread. The balloon thread is the sole caller of those functions today. The