Displaying 20 results from an estimated 21 matches for "balloon_pages_to_shrink".
2018 Jul 22
2
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...nux/mm.h>
> #include <linux/mount.h>
> @@ -40,12 +39,12 @@
> */
> #define VIRTIO_BALLOON_PAGES_PER_PAGE (unsigned)(PAGE_SIZE >> VIRTIO_BALLOON_PFN_SHIFT)
> #define VIRTIO_BALLOON_ARRAY_PFNS_MAX 256
> -#define OOM_VBALLOON_DEFAULT_PAGES 256
> +#define DEFAULT_BALLOON_PAGES_TO_SHRINK 256
> #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
>
> -static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
> -module_param(oom_pages, int, S_IRUSR | S_IWUSR);
> -MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
> +static unsigned long balloon_pages_to_shrink = DEFAU...
2018 Jul 22
2
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...nux/mm.h>
> #include <linux/mount.h>
> @@ -40,12 +39,12 @@
> */
> #define VIRTIO_BALLOON_PAGES_PER_PAGE (unsigned)(PAGE_SIZE >> VIRTIO_BALLOON_PFN_SHIFT)
> #define VIRTIO_BALLOON_ARRAY_PFNS_MAX 256
> -#define OOM_VBALLOON_DEFAULT_PAGES 256
> +#define DEFAULT_BALLOON_PAGES_TO_SHRINK 256
> #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
>
> -static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
> -module_param(oom_pages, int, S_IRUSR | S_IWUSR);
> -MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
> +static unsigned long balloon_pages_to_shrink = DEFAU...
2018 Jul 27
5
[PATCH v2 0/2] virtio-balloon: some improvements
This series is split from the "Virtio-balloon: support free page
reporting" series to make some improvements.
v1->v2 ChangeLog:
- register the shrinker when VIRTIO_BALLOON_F_DEFLATE_ON_OOM is negotiated.
Wei Wang (2):
virtio-balloon: remove BUG() in init_vqs
virtio_balloon: replace oom notifier with shrinker
drivers/virtio/virtio_balloon.c | 125
2018 Jul 27
5
[PATCH v2 0/2] virtio-balloon: some improvements
This series is split from the "Virtio-balloon: support free page
reporting" series to make some improvements.
v1->v2 ChangeLog:
- register the shrinker when VIRTIO_BALLOON_F_DEFLATE_ON_OOM is negotiated.
Wei Wang (2):
virtio-balloon: remove BUG() in init_vqs
virtio_balloon: replace oom notifier with shrinker
drivers/virtio/virtio_balloon.c | 125
2018 Jul 27
0
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
...t;linux/wait.h>
#include <linux/mm.h>
#include <linux/mount.h>
@@ -40,12 +39,12 @@
*/
#define VIRTIO_BALLOON_PAGES_PER_PAGE (unsigned)(PAGE_SIZE >> VIRTIO_BALLOON_PFN_SHIFT)
#define VIRTIO_BALLOON_ARRAY_PFNS_MAX 256
-#define OOM_VBALLOON_DEFAULT_PAGES 256
+#define DEFAULT_BALLOON_PAGES_TO_SHRINK 256
#define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
-static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
-module_param(oom_pages, int, S_IRUSR | S_IWUSR);
-MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
+static unsigned long balloon_pages_to_shrink = DEFAULT_BALLOON_PAGES_TO_SHRINK;
+m...
2018 Jul 20
0
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...t;linux/wait.h>
#include <linux/mm.h>
#include <linux/mount.h>
@@ -40,12 +39,12 @@
*/
#define VIRTIO_BALLOON_PAGES_PER_PAGE (unsigned)(PAGE_SIZE >> VIRTIO_BALLOON_PFN_SHIFT)
#define VIRTIO_BALLOON_ARRAY_PFNS_MAX 256
-#define OOM_VBALLOON_DEFAULT_PAGES 256
+#define DEFAULT_BALLOON_PAGES_TO_SHRINK 256
#define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
-static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
-module_param(oom_pages, int, S_IRUSR | S_IWUSR);
-MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
+static unsigned long balloon_pages_to_shrink = DEFAULT_BALLOON_PAGES_TO_SHRINK;
+m...
2018 Jul 30
2
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
...nux/mm.h>
> #include <linux/mount.h>
> @@ -40,12 +39,12 @@
> */
> #define VIRTIO_BALLOON_PAGES_PER_PAGE (unsigned)(PAGE_SIZE >> VIRTIO_BALLOON_PFN_SHIFT)
> #define VIRTIO_BALLOON_ARRAY_PFNS_MAX 256
> -#define OOM_VBALLOON_DEFAULT_PAGES 256
> +#define DEFAULT_BALLOON_PAGES_TO_SHRINK 256
> #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
>
> -static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
> -module_param(oom_pages, int, S_IRUSR | S_IWUSR);
> -MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
> +static unsigned long balloon_pages_to_shrink = DEFAU...
2018 Jul 30
2
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
...nux/mm.h>
> #include <linux/mount.h>
> @@ -40,12 +39,12 @@
> */
> #define VIRTIO_BALLOON_PAGES_PER_PAGE (unsigned)(PAGE_SIZE >> VIRTIO_BALLOON_PFN_SHIFT)
> #define VIRTIO_BALLOON_ARRAY_PFNS_MAX 256
> -#define OOM_VBALLOON_DEFAULT_PAGES 256
> +#define DEFAULT_BALLOON_PAGES_TO_SHRINK 256
> #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80
>
> -static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
> -module_param(oom_pages, int, S_IRUSR | S_IWUSR);
> -MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
> +static unsigned long balloon_pages_to_shrink = DEFAU...
2018 Jul 20
10
[PATCH v36 0/5] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon
Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT,
implemented by this series enables the virtio-balloon driver to report
hints of guest free pages to the host. It can be used to accelerate live
migration of VMs. Here is an introduction of this usage:
Live migration needs to transfer the VM's
2018 Jul 20
10
[PATCH v36 0/5] Virtio-balloon: support free page reporting
This patch series is separated from the previous "Virtio-balloon
Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT,
implemented by this series enables the virtio-balloon driver to report
hints of guest free pages to the host. It can be used to accelerate live
migration of VMs. Here is an introduction of this usage:
Live migration needs to transfer the VM's
2018 Aug 01
4
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
...s://lkml.org/lkml/2018/7/12/314
>
> This patch replaces the virtio-balloon oom notifier with a shrinker
> to release balloon pages on memory pressure. Users can set the amount of
> memory pages to release each time a shrinker_scan is called via the
> module parameter balloon_pages_to_shrink, and the default amount is 256
> pages. Historically, the feature VIRTIO_BALLOON_F_DEFLATE_ON_OOM has
> been used to release balloon pages on OOM. We continue to use this
> feature bit for the shrinker, so the shrinker is only registered when
> this feature bit has been...
2018 Aug 01
4
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
...s://lkml.org/lkml/2018/7/12/314
>
> This patch replaces the virtio-balloon oom notifier with a shrinker
> to release balloon pages on memory pressure. Users can set the amount of
> memory pages to release each time a shrinker_scan is called via the
> module parameter balloon_pages_to_shrink, and the default amount is 256
> pages. Historically, the feature VIRTIO_BALLOON_F_DEFLATE_ON_OOM has
> been used to release balloon pages on OOM. We continue to use this
> feature bit for the shrinker, so the shrinker is only registered when
> this feature bit has been...
2018 Jul 23
0
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...018 10:48 PM, Michael S. Tsirkin wrote:
> On Fri, Jul 20, 2018 at 04:33:02PM +0800, Wei Wang wrote:
>>
>> +static unsigned long virtio_balloon_shrinker_scan(struct shrinker *shrinker,
>> + struct shrink_control *sc)
>> +{
>> + unsigned long pages_to_free = balloon_pages_to_shrink,
>> + pages_freed = 0;
>> + struct virtio_balloon *vb = container_of(shrinker,
>> + struct virtio_balloon, shrinker);
>> +
>> + /*
>> + * One invocation of leak_balloon can deflate at most
>> + * VIRTIO_BALLOON_ARRAY_PFNS_MAX balloon pages, so...
2018 Aug 02
2
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
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 have a 8GB guest, and we balloon
> out 7GB. When shrink scan is called, the balloon driver will get back 1GB memory and give
> them back to mm, then the ballooned memory becomes 6GB.
Since shrinker might be called concurrently (a...
2018 Aug 02
2
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
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 have a 8GB guest, and we balloon
> out 7GB. When shrink scan is called, the balloon driver will get back 1GB memory and give
> them back to mm, then the ballooned memory becomes 6GB.
Since shrinker might be called concurrently (a...
2018 Jul 23
1
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...hael S. Tsirkin wrote:
> > On Fri, Jul 20, 2018 at 04:33:02PM +0800, Wei Wang wrote:
> > > +static unsigned long virtio_balloon_shrinker_scan(struct shrinker *shrinker,
> > > + struct shrink_control *sc)
> > > +{
> > > + unsigned long pages_to_free = balloon_pages_to_shrink,
> > > + pages_freed = 0;
> > > + struct virtio_balloon *vb = container_of(shrinker,
> > > + struct virtio_balloon, shrinker);
> > > +
> > > + /*
> > > + * One invocation of leak_balloon can deflate at most
> > > + * VIRTIO...
2018 Aug 02
1
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
...gt; > This patch replaces the virtio-balloon oom notifier with a shrinker
> > > to release balloon pages on memory pressure. Users can set the amount of
> > > memory pages to release each time a shrinker_scan is called via the
> > > module parameter balloon_pages_to_shrink, and the default amount is 256
> > > pages. Historically, the feature VIRTIO_BALLOON_F_DEFLATE_ON_OOM has
> > > been used to release balloon pages on OOM. We continue to use this
> > > feature bit for the shrinker, so the shrinker is only registered when
&g...
2018 Aug 02
0
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
...7/12/314
>>
>> This patch replaces the virtio-balloon oom notifier with a shrinker
>> to release balloon pages on memory pressure. Users can set the amount of
>> memory pages to release each time a shrinker_scan is called via the
>> module parameter balloon_pages_to_shrink, and the default amount is 256
>> pages. Historically, the feature VIRTIO_BALLOON_F_DEFLATE_ON_OOM has
>> been used to release balloon pages on OOM. We continue to use this
>> feature bit for the shrinker, so the shrinker is only registered when
>> this f...
2018 Aug 03
1
[PATCH v3 2/2] virtio_balloon: replace oom notifier with shrinker
On Fri, Aug 03, 2018 at 04:32:26PM +0800, Wei Wang wrote:
> The OOM notifier is getting deprecated to use for the reasons:
> - As a callout from the oom context, it is too subtle and easy to
> generate bugs and corner cases which are hard to track;
> - It is called too late (after the reclaiming has been performed).
> Drivers with large amuont of reclaimable memory is expected
2018 Aug 01
0
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
...ins;
Link: https://lkml.org/lkml/2018/7/12/314
This patch replaces the virtio-balloon oom notifier with a shrinker
to release balloon pages on memory pressure. Users can set the
amount of
memory pages to release each time a shrinker_scan is called via the
module parameter balloon_pages_to_shrink, and the default amount is 256
pages. Historically, the feature VIRTIO_BALLOON_F_DEFLATE_ON_OOM has
been used to release balloon pages on OOM. We continue to use this
feature bit for the shrinker, so the shrinker is only registered when
this feature bit has been negotiated with...