search for: woken_wake_funct

Displaying 20 results from an estimated 26 matches for "woken_wake_funct".

2015 Feb 25
2
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...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 || + vb->need_stats_update || + kthread_should_stop() || + freezing(...
2015 Feb 25
2
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...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 || + vb->need_stats_update || + kthread_should_stop() || + freezing(...
2015 Feb 26
1
virtio balloon: do not call blocking ops when !TASK_RUNNING
...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_stats_update - || kthread_should_stop() - || freezing(current)); + + add_wait_qu...
2015 Feb 26
1
virtio balloon: do not call blocking ops when !TASK_RUNNING
...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_stats_update - || kthread_should_stop() - || freezing(current)); + + add_wait_qu...
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...is messing around with major/minor numbers does. Without allocating a cdev via cdev_add/etc there is only a single char dev in existence here. This and the stuff in vhost_vdpa_open() looks non-functional. > +static void vhost_vdpa_remove(struct device *dev) > +{ > + DEFINE_WAIT_FUNC(wait, woken_wake_function); > + struct vhost_vdpa *v = dev_get_drvdata(dev); > + int opened; > + > + add_wait_queue(&vhost_vdpa.release_q, &wait); > + > + do { > + opened = atomic_cmpxchg(&v->opened, 0, 1); > + if (!opened) > + break; > + wait_woken(&wait, TASK_UNINTE...
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...is messing around with major/minor numbers does. Without allocating a cdev via cdev_add/etc there is only a single char dev in existence here. This and the stuff in vhost_vdpa_open() looks non-functional. > +static void vhost_vdpa_remove(struct device *dev) > +{ > + DEFINE_WAIT_FUNC(wait, woken_wake_function); > + struct vhost_vdpa *v = dev_get_drvdata(dev); > + int opened; > + > + add_wait_queue(&vhost_vdpa.release_q, &wait); > + > + do { > + opened = atomic_cmpxchg(&v->opened, 0, 1); > + if (!opened) > + break; > + wait_woken(&wait, TASK_UNINTE...
2015 Feb 25
0
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
.../* > * 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 || > + vb->need_stats_updat...
2015 Feb 25
0
[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING
.../* > * 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 || > + vb->need_stats_updat...
2020 Feb 19
0
[PATCH] vhost: introduce vDPA based backend
...there is only a > single char dev in existence here. This and the stuff in > vhost_vdpa_open() looks non-functional. I followed the code in VFIO. Please see more details below. > > > +static void vhost_vdpa_remove(struct device *dev) > > +{ > > + DEFINE_WAIT_FUNC(wait, woken_wake_function); > > + struct vhost_vdpa *v = dev_get_drvdata(dev); > > + int opened; > > + > > + add_wait_queue(&vhost_vdpa.release_q, &wait); > > + > > + do { > > + opened = atomic_cmpxchg(&v->opened, 0, 1); > > + if (!opened) > > + bre...
2015 Feb 25
2
[PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...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_stats_update - || kthread_should_stop() - || freezing(current)); + + add_wait_qu...
2015 Feb 25
2
[PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING
...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_stats_update - || kthread_should_stop() - || freezing(current)); + + add_wait_qu...
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
2015 Dec 04
0
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...ds_target(struct virtio_balloon *vb) @@ -349,43 +346,25 @@ static int virtballoon_oom_notify(struct notifier_block *self, return NOTIFY_OK; } -static int balloon(void *_vballoon) +static void balloon(struct work_struct *work) { - 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 || - vb->need_stats_update || - kthread_should_stop() || - freezing(...
2017 Jul 19
1
kernel-4.9.37-29.el7 (and el6)
On Mon, 17 Jul 2017, Johnny Hughes wrote: > Are the testing kernels (kernel-4.9.37-29.el7 and kernel-4.9.37-29.el6, > with the one config file change) working for everyone: > > (turn off: CONFIG_IO_STRICT_DEVMEM) Hello. Maybe it's not the most appropriate thread or time, but I have been signalling it before: 4.9.* kernels do not work well for me any more (and for other people
2015 Feb 26
2
virtio balloon: do not call blocking ops when !TASK_RUNNING
On Thu, Feb 26, 2015 at 11:50:42AM +1030, Rusty Russell wrote: > Thomas Huth <thuth at linux.vnet.ibm.com> writes: > > Hi all, > > > > with the recent kernel 3.19, I get a kernel warning when I start my > > KVM guest on s390 with virtio balloon enabled: > > The deeper problem is that virtio_ccw_get_config just silently fails on > OOM. > > Neither
2015 Feb 26
2
virtio balloon: do not call blocking ops when !TASK_RUNNING
On Thu, Feb 26, 2015 at 11:50:42AM +1030, Rusty Russell wrote: > Thomas Huth <thuth at linux.vnet.ibm.com> writes: > > Hi all, > > > > with the recent kernel 3.19, I get a kernel warning when I start my > > KVM guest on s390 with virtio balloon enabled: > > The deeper problem is that virtio_ccw_get_config just silently fails on > OOM. > > Neither
2016 Jan 01
2
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...-349,43 +346,25 @@ static int virtballoon_oom_notify(struct notifier_block *self, > return NOTIFY_OK; > } > > -static int balloon(void *_vballoon) > +static void balloon(struct work_struct *work) > { > - 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 || > - vb->need_stats_updat...
2016 Jan 01
2
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...-349,43 +346,25 @@ static int virtballoon_oom_notify(struct notifier_block *self, > return NOTIFY_OK; > } > > -static int balloon(void *_vballoon) > +static void balloon(struct work_struct *work) > { > - 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 || > - vb->need_stats_updat...
2016 Jun 16
0
[PATCH v7 00/12] Support non-lru page migration
...1073/0x1638 [zram] [ 344.264243] [<ffffffffa04141ba>] ? zram_slot_free_notify+0x1c8/0x1c8 [zram] [ 344.264247] [<ffffffff812fc37b>] ? wb_writeback+0x316/0x44c [ 344.264251] [<ffffffffa0416104>] zram_make_request+0x6f5/0x89f [zram] [ 344.264255] [<ffffffff81111ef0>] ? woken_wake_function+0x51/0x51 [ 344.264260] [<ffffffffa0415a0f>] ? zram_rw_page+0x21d/0x21d [zram] [ 344.264263] [<ffffffff81494948>] ? blk_exit_rl+0x39/0x39 [ 344.264267] [<ffffffff81491130>] ? handle_bad_sector+0x192/0x192 [ 344.264271] [<ffffffff811506a1>] ? call_rcu+0x12/0x14 [...