Re: [PATCH] xen/balloon: use a kernel thread instead a workqueue

2021-09-08 Thread Boris Ostrovsky
On 9/8/21 11:11 AM, Juergen Gross wrote: > On 08.09.21 16:47, Boris Ostrovsky wrote: >> >> >> Given that wait_event_interruptible_timeout() is a bunch of nested macros do >> we need to worry here about overly aggressive compiler optimizing out >> 'credit = current_credit()'? > > I don't think s

Re: [PATCH] xen/balloon: use a kernel thread instead a workqueue

2021-09-08 Thread Juergen Gross
On 08.09.21 16:47, Boris Ostrovsky wrote: On 8/27/21 8:32 AM, Juergen Gross wrote: +static bool balloon_thread_cond(enum bp_state state, long credit) +{ + if (state != BP_EAGAIN) + credit = 0; + + return current_credit() != credit || kthread_should_stop(); +} + +/* + *

Re: [PATCH] xen/balloon: use a kernel thread instead a workqueue

2021-09-08 Thread Boris Ostrovsky
On 8/27/21 8:32 AM, Juergen Gross wrote: > +static bool balloon_thread_cond(enum bp_state state, long credit) > +{ > + if (state != BP_EAGAIN) > + credit = 0; > + > + return current_credit() != credit || kthread_should_stop(); > +} > + > +/* > + * As this is a kthread it is gu

[PATCH] xen/balloon: use a kernel thread instead a workqueue

2021-08-27 Thread Juergen Gross
Today the Xen ballooning is done via delayed work in a workqueue. This might result in workqueue hangups being reported in case of large amounts of memory are being ballooned in one go (here 16GB): BUG: workqueue lockup - pool cpus=6 node=0 flags=0x0 nice=0 stuck for 64s! Showing busy workqueues a