search for: oom_notifier

Displaying 20 results from an estimated 23 matches for "oom_notifier".

2017 Oct 02
0
[RFC] [PATCH] mm,oom: Offload OOM notify callback to a kernel thread.
...2017 at 02:44:34PM +0900, Tetsuo Handa wrote: > Tetsuo Handa wrote: > > Michael S. Tsirkin wrote: > > > On Mon, Sep 11, 2017 at 07:27:19PM +0900, Tetsuo Handa wrote: > > > > Hello. > > > > > > > > I noticed that virtio_balloon is using register_oom_notifier() and > > > > leak_balloon() from virtballoon_oom_notify() might depend on > > > > __GFP_DIRECT_RECLAIM memory allocation. > > > > > > > > In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to > > > > serialize aga...
2017 Sep 11
6
mm, virtio: possible OOM lockup at virtballoon_oom_notify()
Hello. I noticed that virtio_balloon is using register_oom_notifier() and leak_balloon() from virtballoon_oom_notify() might depend on __GFP_DIRECT_RECLAIM memory allocation. In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to serialize against fill_balloon(). But in fill_balloon(), alloc_page(GFP_HIGHUSER[_MOVABLE] | __GFP_NOMEMALLOC | _...
2017 Sep 11
6
mm, virtio: possible OOM lockup at virtballoon_oom_notify()
Hello. I noticed that virtio_balloon is using register_oom_notifier() and leak_balloon() from virtballoon_oom_notify() might depend on __GFP_DIRECT_RECLAIM memory allocation. In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to serialize against fill_balloon(). But in fill_balloon(), alloc_page(GFP_HIGHUSER[_MOVABLE] | __GFP_NOMEMALLOC | _...
2017 Dec 17
0
[PATCH v19 3/7] xbitmap: add more operations
On 12/16/2017 07:28 PM, Tetsuo Handa wrote: > Wei Wang wrote: >> On 12/16/2017 02:42 AM, Matthew Wilcox wrote: >>> On Tue, Dec 12, 2017 at 07:55:55PM +0800, Wei Wang wrote: >>>> +int xb_preload_and_set_bit(struct xb *xb, unsigned long bit, gfp_t gfp); >>> I'm struggling to understand when one would use this. The xb_ API >>> requires you to
2017 Oct 22
2
[PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock
Wei Wang wrote: > The balloon_lock was used to synchronize the access demand to elements > of struct virtio_balloon and its queue operations (please see commit > e22504296d). This prevents the concurrent run of the leak_balloon and > fill_balloon functions, thereby resulting in a deadlock issue on OOM: > > fill_balloon: take balloon_lock and wait for OOM to get some memory; >
2017 Oct 22
2
[PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock
Wei Wang wrote: > The balloon_lock was used to synchronize the access demand to elements > of struct virtio_balloon and its queue operations (please see commit > e22504296d). This prevents the concurrent run of the leak_balloon and > fill_balloon functions, thereby resulting in a deadlock issue on OOM: > > fill_balloon: take balloon_lock and wait for OOM to get some memory; >
2020 Feb 06
2
[PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...shrinker); > if (err) > goto out_del_balloon_wq; > } > + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) { > + vb->oom_nb.notifier_call = virtio_balloon_oom_notify; > + vb->oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY; > + err = register_oom_notifier(&vb->oom_nb); > + if (err < 0) > + goto out_unregister_shrinker; > + } > + > virtio_device_ready(vdev); > > if (towards_target(vb)) > virtballoon_changed(vdev); > return 0; > > +out_unregister_shrinker: > + if (virtio_has_feature(vdev, V...
2020 Feb 06
2
[PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...shrinker); > if (err) > goto out_del_balloon_wq; > } > + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) { > + vb->oom_nb.notifier_call = virtio_balloon_oom_notify; > + vb->oom_nb.priority = VIRTIO_BALLOON_OOM_NOTIFY_PRIORITY; > + err = register_oom_notifier(&vb->oom_nb); > + if (err < 0) > + goto out_unregister_shrinker; > + } > + > virtio_device_ready(vdev); > > if (towards_target(vb)) > virtballoon_changed(vdev); > return 0; > > +out_unregister_shrinker: > + if (virtio_has_feature(vdev, V...
2017 Oct 22
0
[PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock
On 10/22/2017 01:20 PM, Tetsuo Handa wrote: > Wei Wang wrote: >> The balloon_lock was used to synchronize the access demand to elements >> of struct virtio_balloon and its queue operations (please see commit >> e22504296d). This prevents the concurrent run of the leak_balloon and >> fill_balloon functions, thereby resulting in a deadlock issue on OOM: >> >>
2020 Feb 06
0
[PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
On 06.02.20 08:40, Michael S. Tsirkin wrote: > On Wed, Feb 05, 2020 at 05:34:02PM +0100, 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
2017 Oct 20
0
[PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock
The balloon_lock was used to synchronize the access demand to elements of struct virtio_balloon and its queue operations (please see commit e22504296d). This prevents the concurrent run of the leak_balloon and fill_balloon functions, thereby resulting in a deadlock issue on OOM: fill_balloon: take balloon_lock and wait for OOM to get some memory; oom_notify: release some inflated memory via
2017 Dec 15
4
[PATCH v19 3/7] xbitmap: add more operations
On Tue, Dec 12, 2017 at 07:55:55PM +0800, Wei Wang wrote: > +int xb_preload_and_set_bit(struct xb *xb, unsigned long bit, gfp_t gfp); I'm struggling to understand when one would use this. The xb_ API requires you to handle your own locking. But specifying GFP flags here implies you can sleep. So ... um ... there's no locking? > +void xb_clear_bit_range(struct xb *xb, unsigned
2017 Dec 15
4
[PATCH v19 3/7] xbitmap: add more operations
On Tue, Dec 12, 2017 at 07:55:55PM +0800, Wei Wang wrote: > +int xb_preload_and_set_bit(struct xb *xb, unsigned long bit, gfp_t gfp); I'm struggling to understand when one would use this. The xb_ API requires you to handle your own locking. But specifying GFP flags here implies you can sleep. So ... um ... there's no locking? > +void xb_clear_bit_range(struct xb *xb, unsigned
2020 Feb 06
2
[PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
On Thu, Feb 06, 2020 at 09:42:34AM +0100, David Hildenbrand wrote: > On 06.02.20 08:40, Michael S. Tsirkin wrote: > > On Wed, Feb 05, 2020 at 05:34:02PM +0100, David Hildenbrand wrote: > >> Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") > >> changed the behavior when deflation happens automatically. Instead of > >> deflating
2020 Feb 06
2
[PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
On Thu, Feb 06, 2020 at 09:42:34AM +0100, David Hildenbrand wrote: > On 06.02.20 08:40, Michael S. Tsirkin wrote: > > On Wed, Feb 05, 2020 at 05:34:02PM +0100, David Hildenbrand wrote: > >> Commit 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") > >> changed the behavior when deflation happens automatically. Instead of > >> deflating
2017 Oct 20
9
[PATCH v1 0/3] Virtio-balloon Improvement
This patch series intends to summarize the recent contributions made by Michael S. Tsirkin, Tetsuo Handa, Michal Hocko etc. via reporting and discussing the related deadlock issues on the mailinglist. Please check each patch for details. >From a high-level point of view, this patch series achieves: 1) eliminate the deadlock issue fundamentally caused by the inability to run leak_balloon and
2017 Oct 20
9
[PATCH v1 0/3] Virtio-balloon Improvement
This patch series intends to summarize the recent contributions made by Michael S. Tsirkin, Tetsuo Handa, Michal Hocko etc. via reporting and discussing the related deadlock issues on the mailinglist. Please check each patch for details. >From a high-level point of view, this patch series achieves: 1) eliminate the deadlock issue fundamentally caused by the inability to run leak_balloon and
2014 Aug 20
1
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...irq); > err = -EIO; > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > index 4c22a5b..0c248fe 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -1745,7 +1745,7 @@ out_gem_unload: > WARN_ON(unregister_oom_notifier(&dev_priv->mm.oom_notifier)); > unregister_shrinker(&dev_priv->mm.shrinker); > > - if (dev->pdev->msi_enabled) > + if (pci_dev_msi_enabled(dev->pdev, MSI_TYPE)) > pci_disable_msi(dev->pdev); > > intel_teardown_gmbus(dev); > @@ -1826,7 +1826...
2014 Aug 20
1
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...irq); > err = -EIO; > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > index 4c22a5b..0c248fe 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -1745,7 +1745,7 @@ out_gem_unload: > WARN_ON(unregister_oom_notifier(&dev_priv->mm.oom_notifier)); > unregister_shrinker(&dev_priv->mm.shrinker); > > - if (dev->pdev->msi_enabled) > + if (pci_dev_msi_enabled(dev->pdev, MSI_TYPE)) > pci_disable_msi(dev->pdev); > > intel_teardown_gmbus(dev); > @@ -1826,7 +1826...
2014 Jul 26
0
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...cate interrupt %d\n", dev->irq); err = -EIO; diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 4c22a5b..0c248fe 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1745,7 +1745,7 @@ out_gem_unload: WARN_ON(unregister_oom_notifier(&dev_priv->mm.oom_notifier)); unregister_shrinker(&dev_priv->mm.shrinker); - if (dev->pdev->msi_enabled) + if (pci_dev_msi_enabled(dev->pdev, MSI_TYPE)) pci_disable_msi(dev->pdev); intel_teardown_gmbus(dev); @@ -1826,7 +1826,7 @@ int i915_driver_unload(struct dr...