Re: [PATCH 1/3] kfence: await for allocation using wait_event

2021-04-19 Thread Marco Elver
On Mon, 19 Apr 2021 at 11:44, Marco Elver wrote: > > On Mon, 19 Apr 2021 at 11:41, Hillf Danton wrote: > > > > On Mon, 19 Apr 2021 10:50:25 Marco Elver wrote: > > > + > > > + WRITE_ONCE(kfence_timer_waiting, true); > > > + smp_mb(); /* See comment in __kfence_alloc(). */ > > > > This is n

Re: [PATCH 1/3] kfence: await for allocation using wait_event

2021-04-19 Thread Marco Elver
On Mon, 19 Apr 2021 at 11:41, Hillf Danton wrote: > > On Mon, 19 Apr 2021 10:50:25 Marco Elver wrote: > > + > > + WRITE_ONCE(kfence_timer_waiting, true); > > + smp_mb(); /* See comment in __kfence_alloc(). */ > > This is not needed given task state change in wait_event(). Yes it is. We wa

[PATCH 1/3] kfence: await for allocation using wait_event

2021-04-19 Thread Marco Elver
On mostly-idle systems, we have observed that toggle_allocation_gate() is a cause of frequent wake-ups, preventing an otherwise idle CPU to go into a lower power state. A late change in KFENCE's development, due to a potential deadlock [1], required changing the scheduling-friendly wait_event_time