Displaying 20 results from an estimated 94 matches for "_vballoon".
Did you mean:
vballoon
2015 Feb 25
2
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...t;
#include <linux/balloon_compaction.h>
#include <linux/oom.h>
+#include <linux/wait.h>
/*
* Balloon device works in 4K page units. So each page is pointed to by
@@ -334,12 +335,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
static int balloon(void *_vballoon)
{
struct virtio_balloon *vb = _vballoon;
+ DEFINE_WAIT_FUNC(wait, woken_wake_function);
set_freezable();
while (!kthread_should_stop()) {
s64 diff;
try_to_freeze();
+
+ add_wait_queue(&vb->config_change, &wait);
+ for (;;) {
+ if ((diff = towards_target(vb)) != 0 ||...
2015 Feb 25
2
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...t;
#include <linux/balloon_compaction.h>
#include <linux/oom.h>
+#include <linux/wait.h>
/*
* Balloon device works in 4K page units. So each page is pointed to by
@@ -334,12 +335,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
static int balloon(void *_vballoon)
{
struct virtio_balloon *vb = _vballoon;
+ DEFINE_WAIT_FUNC(wait, woken_wake_function);
set_freezable();
while (!kthread_should_stop()) {
s64 diff;
try_to_freeze();
+
+ add_wait_queue(&vb->config_change, &wait);
+ for (;;) {
+ if ((diff = towards_target(vb)) != 0 ||...
2015 Feb 26
1
virtio balloon: do not call blocking ops when !TASK_RUNNING
...t;
#include <linux/balloon_compaction.h>
#include <linux/oom.h>
+#include <linux/wait.h>
/*
* Balloon device works in 4K page units. So each page is pointed to by
@@ -334,17 +335,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
static int balloon(void *_vballoon)
{
struct virtio_balloon *vb = _vballoon;
+ DEFINE_WAIT_FUNC(wait, woken_wake_function);
set_freezable();
while (!kthread_should_stop()) {
s64 diff;
try_to_freeze();
- wait_event_interruptible(vb->config_change,
- (diff = towards_target(vb)) != 0
- || vb->need_stat...
2015 Feb 26
1
virtio balloon: do not call blocking ops when !TASK_RUNNING
...t;
#include <linux/balloon_compaction.h>
#include <linux/oom.h>
+#include <linux/wait.h>
/*
* Balloon device works in 4K page units. So each page is pointed to by
@@ -334,17 +335,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
static int balloon(void *_vballoon)
{
struct virtio_balloon *vb = _vballoon;
+ DEFINE_WAIT_FUNC(wait, woken_wake_function);
set_freezable();
while (!kthread_should_stop()) {
s64 diff;
try_to_freeze();
- wait_event_interruptible(vb->config_change,
- (diff = towards_target(vb)) != 0
- || vb->need_stat...
2009 Nov 05
1
virtio: Add memory statistics reporting to the balloon driver
agl at linux.vnet.ibm.com wrote:
> Here are the corresponding changes to the Linux virtio driver...
>
> virtio: Add memory statistics reporting to the balloon driver
>
> When using ballooning to manage overcommitted memory on a host, a system for
> guests to communicate their memory usage to the host can provide information
> that will minimize the impact
2009 Nov 05
1
virtio: Add memory statistics reporting to the balloon driver
agl at linux.vnet.ibm.com wrote:
> Here are the corresponding changes to the Linux virtio driver...
>
> virtio: Add memory statistics reporting to the balloon driver
>
> When using ballooning to manage overcommitted memory on a host, a system for
> guests to communicate their memory usage to the host can provide information
> that will minimize the impact
2015 Feb 25
0
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...action.h>
> #include <linux/oom.h>
> +#include <linux/wait.h>
>
> /*
> * Balloon device works in 4K page units. So each page is pointed to by
> @@ -334,12 +335,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
> static int balloon(void *_vballoon)
> {
> struct virtio_balloon *vb = _vballoon;
> + DEFINE_WAIT_FUNC(wait, woken_wake_function);
>
> set_freezable();
> while (!kthread_should_stop()) {
> s64 diff;
>
> try_to_freeze();
> +
> + add_wait_queue(&vb->config_change, &wait);
&g...
2015 Feb 25
0
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...action.h>
> #include <linux/oom.h>
> +#include <linux/wait.h>
>
> /*
> * Balloon device works in 4K page units. So each page is pointed to by
> @@ -334,12 +335,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
> static int balloon(void *_vballoon)
> {
> struct virtio_balloon *vb = _vballoon;
> + DEFINE_WAIT_FUNC(wait, woken_wake_function);
>
> set_freezable();
> while (!kthread_should_stop()) {
> s64 diff;
>
> try_to_freeze();
> +
> + add_wait_queue(&vb->config_change, &wait);
&g...
2014 Oct 15
4
[PATCH v3 0/2] shrink virtio baloon on OOM in guest
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
that these control tools does not have enough time to react on fast changing
memory load. As a result OS runs out of memory and invokes OOM-killer.
The balancing of
2014 Oct 15
4
[PATCH v3 0/2] shrink virtio baloon on OOM in guest
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
that these control tools does not have enough time to react on fast changing
memory load. As a result OS runs out of memory and invokes OOM-killer.
The balancing of
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...ev->priv;
- wake_up(&vb->config_change);
+ queue_work(vb->wq, &vb->wq_work);
}
static inline s64 towards_target(struct virtio_balloon *vb)
@@ -287,35 +292,22 @@ static void update_balloon_size(struct virtio_balloon *vb)
&actual);
}
-static int balloon(void *_vballoon)
+static void balloon(struct work_struct *work)
{
- struct virtio_balloon *vb = _vballoon;
-
- set_freezable();
- while (!kthread_should_stop()) {
- s64 diff;
-
- try_to_freeze();
- wait_event_interruptible(vb->config_change,
- (diff = towards_target(vb)) != 0
- || vb->need_stat...
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...ev->priv;
- wake_up(&vb->config_change);
+ queue_work(vb->wq, &vb->wq_work);
}
static inline s64 towards_target(struct virtio_balloon *vb)
@@ -287,35 +292,22 @@ static void update_balloon_size(struct virtio_balloon *vb)
&actual);
}
-static int balloon(void *_vballoon)
+static void balloon(struct work_struct *work)
{
- struct virtio_balloon *vb = _vballoon;
-
- set_freezable();
- while (!kthread_should_stop()) {
- s64 diff;
-
- try_to_freeze();
- wait_event_interruptible(vb->config_change,
- (diff = towards_target(vb)) != 0
- || vb->need_stat...
2015 Feb 25
2
[PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...t;
#include <linux/balloon_compaction.h>
#include <linux/oom.h>
+#include <linux/wait.h>
/*
* Balloon device works in 4K page units. So each page is pointed to by
@@ -334,17 +335,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
static int balloon(void *_vballoon)
{
struct virtio_balloon *vb = _vballoon;
+ DEFINE_WAIT_FUNC(wait, woken_wake_function);
set_freezable();
while (!kthread_should_stop()) {
s64 diff;
try_to_freeze();
- wait_event_interruptible(vb->config_change,
- (diff = towards_target(vb)) != 0
- || vb->need_stat...
2015 Mar 04
2
virtio balloon: do not call blocking ops when !TASK_RUNNING
...usty at rustcorp.com.au>
>
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index 0413157f3b49..3f4d5acdbde0 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -340,6 +340,15 @@ static int balloon(void *_vballoon)
> s64 diff;
>
> try_to_freeze();
> +
> + /*
> + * Reading the config on the ccw backend involves an
> + * allocation, so we may actually sleep and have an
> + * extra iteration. It's extremely unlikely,
Hmm, this part of the comment seems wrong to me.
R...
2015 Feb 25
2
[PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...t;
#include <linux/balloon_compaction.h>
#include <linux/oom.h>
+#include <linux/wait.h>
/*
* Balloon device works in 4K page units. So each page is pointed to by
@@ -334,17 +335,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
static int balloon(void *_vballoon)
{
struct virtio_balloon *vb = _vballoon;
+ DEFINE_WAIT_FUNC(wait, woken_wake_function);
set_freezable();
while (!kthread_should_stop()) {
s64 diff;
try_to_freeze();
- wait_event_interruptible(vb->config_change,
- (diff = towards_target(vb)) != 0
- || vb->need_stat...
2015 Mar 04
2
virtio balloon: do not call blocking ops when !TASK_RUNNING
...usty at rustcorp.com.au>
>
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index 0413157f3b49..3f4d5acdbde0 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -340,6 +340,15 @@ static int balloon(void *_vballoon)
> s64 diff;
>
> try_to_freeze();
> +
> + /*
> + * Reading the config on the ccw backend involves an
> + * allocation, so we may actually sleep and have an
> + * extra iteration. It's extremely unlikely,
Hmm, this part of the comment seems wrong to me.
R...
2014 Oct 15
0
[PATCH 2/2] virtio_balloon: free some memory from balloon on OOM
...ompaction.h>
+#include <linux/oom.h>
/*
* Balloon device works in 4K page units. So each page is pointed to by
@@ -36,6 +37,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 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");
struct virtio_balloon
{
@@ -71,6 +78,9 @@ struct virtio_balloon...
2014 Oct 15
0
[PATCH 2/2] virtio_balloon: free some memory from balloon on OOM
...ompaction.h>
+#include <linux/oom.h>
/*
* Balloon device works in 4K page units. So each page is pointed to by
@@ -36,6 +37,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 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");
struct virtio_balloon
{
@@ -71,6 +78,9 @@ struct virtio_balloon...
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
It has been long since I have sent v3 of the balloon conversion from
a kthread to a workqueue. I have gained some more experience with
the APIs in the meantime. I hope that you would like the outcome.
I have added one more patch that fixes a separate problem with
restoring the balloon after the system freeze. I have found this
when testing the conversion.
Changes against v3:
+ rebased on
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
It has been long since I have sent v3 of the balloon conversion from
a kthread to a workqueue. I have gained some more experience with
the APIs in the meantime. I hope that you would like the outcome.
I have added one more patch that fixes a separate problem with
restoring the balloon after the system freeze. I have found this
when testing the conversion.
Changes against v3:
+ rebased on