Re: [PATCH v3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-10 Thread Tyler Sanderson via Virtualization
On Tue, Mar 10, 2020 at 4:39 AM David Hildenbrand wrote: > > Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") > changed the behavior when deflation happens automatically. Instead of > deflating when called by the OOM handler, the shrinker is used. > > However, the

Re: [PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-03-07 Thread Tyler Sanderson via Virtualization
Tested-by: Tyler Sanderson Test setup: VM with 16 CPU, 64GB RAM. Running Debian 10. We have a 42 GB file full of random bytes that we continually cat to /dev/null. This fills the page cache as the file is read. Meanwhile we trigger the balloon to inflate, with a target size of 53 GB. This setup

Re: [PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-02-20 Thread Tyler Sanderson via Virtualization
Testing this patch is on my short-term TODO list, but I wasn't able to get to it this week. It is prioritized. In the meantime, I can anecdotally vouch that kernels before 4.19, the ones using the OOM notifier callback, have roughly 10x faster balloon inflation when pressuring the cache. So I

Re: [PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-02-14 Thread Tyler Sanderson via Virtualization
Regarding Wei's patch that modifies the shrinker implementation, versus this patch which reverts to OOM notifier: I am in favor of both patches. But I do want to make sure a fix gets back ported to 4.19 where the performance regression was first introduced. My concern with reverting to the OOM

Re: [PATCH RFC] virtio_balloon: conservative balloon page shrinking

2020-02-14 Thread Tyler Sanderson via Virtualization
Sorry for the slow reply. Re: Module parameters: I prefer not to have module parameters since they are controlled by the guest. In general, in virtualized environments the admins controlling the hypervisor are more knowledgeable about these things than the users. A feature bit seems useful so

Re: [PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-02-05 Thread Tyler Sanderson via Virtualization
On Wed, Feb 5, 2020 at 2:52 PM David Hildenbrand wrote: > > > Am 05.02.2020 um 23:37 schrieb Tyler Sanderson : > >  > > > On Wed, Feb 5, 2020 at 8:34 AM David Hildenbrand wrote: > >> Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") >> changed the behavior when

Re: [PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM

2020-02-05 Thread Tyler Sanderson via Virtualization
On Wed, Feb 5, 2020 at 8:34 AM David Hildenbrand wrote: > Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") > changed the behavior when deflation happens automatically. Instead of > deflating when called by the OOM handler, the shrinker is used. > > However, the balloon

Re: Balloon pressuring page cache

2020-02-05 Thread Tyler Sanderson via Virtualization
On Wed, Feb 5, 2020 at 11:22 AM Alexander Duyck < alexander.h.du...@linux.intel.com> wrote: > On Wed, 2020-02-05 at 11:01 -0800, Tyler Sanderson wrote: > > > > On Tue, Feb 4, 2020 at 10:57 PM Michael S. Tsirkin wrote: > > On Tue, Feb 04, 2020 at 03:58:51PM -0800, Tyler Sanderson wrote: > > >

Re: Balloon pressuring page cache

2020-02-05 Thread Tyler Sanderson via Virtualization
On Tue, Feb 4, 2020 at 10:57 PM Michael S. Tsirkin wrote: > On Tue, Feb 04, 2020 at 03:58:51PM -0800, Tyler Sanderson wrote: > > > > > > > > 1. It is last-resort, which means the system has already > gone through > > > > heroics to prevent OOM. Those heroic

Re: Balloon pressuring page cache

2020-02-05 Thread Tyler Sanderson via Virtualization
On Wed, Feb 5, 2020 at 1:00 AM Wang, Wei W wrote: > On Wednesday, February 5, 2020 4:57 PM, David Hildenbrand wrote: > > >> Yes, I agree with you. Yet, I am thinking about one > > >> (unlikely?impossible?) scenario. Can you refresh my brain why that > > >> cannot happen (IOW, why we don't have

Re: Balloon pressuring page cache

2020-02-04 Thread Tyler Sanderson via Virtualization
On Tue, Feb 4, 2020 at 3:58 PM Tyler Sanderson wrote: > > > On Tue, Feb 4, 2020 at 11:17 AM David Hildenbrand > wrote: > >> On 04.02.20 19:52, Tyler Sanderson wrote: >> > >> > >> > On Tue, Feb 4, 2020 at 12:29 AM David Hildenbrand > > > wrote: >> > >> > On 03.02.20

Re: Balloon pressuring page cache

2020-02-04 Thread Tyler Sanderson via Virtualization
On Tue, Feb 4, 2020 at 11:17 AM David Hildenbrand wrote: > On 04.02.20 19:52, Tyler Sanderson wrote: > > > > > > On Tue, Feb 4, 2020 at 12:29 AM David Hildenbrand > > wrote: > > > > On 03.02.20 21:32, Tyler Sanderson wrote: > > > There were apparently good

Re: Balloon pressuring page cache

2020-02-04 Thread Tyler Sanderson via Virtualization
On Tue, Feb 4, 2020 at 12:29 AM David Hildenbrand wrote: > On 03.02.20 21:32, Tyler Sanderson wrote: > > There were apparently good reasons for moving away from OOM notifier > > callback: > > https://lkml.org/lkml/2018/7/12/314 > > https://lkml.org/lkml/2018/8/2/322 > > > > In particular the OOM

Re: Balloon pressuring page cache

2020-02-03 Thread Tyler Sanderson via Virtualization
On Mon, Feb 3, 2020 at 1:22 PM Alexander Duyck < alexander.h.du...@linux.intel.com> wrote: > On Mon, 2020-02-03 at 12:32 -0800, Tyler Sanderson wrote: > > There were apparently good reasons for moving away from OOM notifier > > callback: > > https://lkml.org/lkml/2018/7/12/314 > >

Re: Balloon pressuring page cache

2020-02-03 Thread Tyler Sanderson via Virtualization
t; On Thursday, January 30, 2020 11:03 PM, David Hildenbrand wrote: > > >>> > On 29.01.20 20:11, Tyler Sanderson wrote: > > >>> > > > > >>> > > > > >>> > > On Wed, Jan 29, 2020 at 2:31 AM David Hildenbrand <

Re: Balloon pressuring page cache

2020-01-30 Thread Tyler Sanderson via Virtualization
On Thu, Jan 30, 2020 at 7:03 AM David Hildenbrand wrote: > On 29.01.20 20:11, Tyler Sanderson wrote: > > > > > > On Wed, Jan 29, 2020 at 2:31 AM David Hildenbrand > <mailto:da...@redhat.com>> wrote: > > > > On 29.01.20 01:22, Tyler Sanderson

Re: Balloon pressuring page cache

2020-01-30 Thread Tyler Sanderson via Virtualization
> > <mailto:da...@redhat.com>> wrote: > > > > > > On 29.01.20 01:22, Tyler Sanderson via Virtualization wrote: > > > > A primary advantage of virtio balloon over other memory reclaim > > > > mechanisms is that it can pressure the guest's page cache into &g

Re: Balloon pressuring page cache

2020-01-29 Thread Tyler Sanderson via Virtualization
On Wed, Jan 29, 2020 at 2:31 AM David Hildenbrand wrote: > On 29.01.20 01:22, Tyler Sanderson via Virtualization wrote: > > A primary advantage of virtio balloon over other memory reclaim > > mechanisms is that it can pressure the guest's page cache into shrinking. > &g

Balloon pressuring page cache

2020-01-28 Thread Tyler Sanderson via Virtualization
A primary advantage of virtio balloon over other memory reclaim mechanisms is that it can pressure the guest's page cache into shrinking. However, since the balloon driver changed to using the shrinker API

Re: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2019-10-06 Thread Tyler Sanderson via Virtualization
On Sun, Oct 6, 2019 at 4:48 AM Michael S. Tsirkin wrote: > On Sun, Oct 06, 2019 at 10:30:40AM +0200, David Hildenbrand wrote: > > Please note the "use outside of a testing or debugging environment is > > not recommended". Usually you want a "soft" version of this, e.g., via > > the OOM handler