Re: uvm_swap: introduce uvm_swap_data_lock

2022-08-18 Thread Theo Buehler
On Wed, Aug 17, 2022 at 03:12:22PM +0200, Martin Pieuchot wrote: > On 16/01/22(Sun) 15:35, Martin Pieuchot wrote: > > On 30/12/21(Thu) 23:38, Theo Buehler wrote: > > > The diff below does two things: it adds a uvm_swap_data_lock mutex and > > > trades it for the KERNEL_LOCK in uvm_swapisfull() and

Re: uvm_swap: introduce uvm_swap_data_lock

2022-08-17 Thread Martin Pieuchot
On 16/01/22(Sun) 15:35, Martin Pieuchot wrote: > On 30/12/21(Thu) 23:38, Theo Buehler wrote: > > The diff below does two things: it adds a uvm_swap_data_lock mutex and > > trades it for the KERNEL_LOCK in uvm_swapisfull() and uvm_swap_markbad() > > Why is it enough? Which fields is the lock prote

Re: uvm_swap: introduce uvm_swap_data_lock

2022-01-16 Thread Martin Pieuchot
Nice! On 30/12/21(Thu) 23:38, Theo Buehler wrote: > The diff below does two things: it adds a uvm_swap_data_lock mutex and > trades it for the KERNEL_LOCK in uvm_swapisfull() and uvm_swap_markbad() Why is it enough? Which fields is the lock protecting in these function? Is it `uvmexp.swpages',

uvm_swap: introduce uvm_swap_data_lock

2021-12-30 Thread Theo Buehler
The diff below does two things: it adds a uvm_swap_data_lock mutex and trades it for the KERNEL_LOCK in uvm_swapisfull() and uvm_swap_markbad() The uvm_swap_data_lock protects all swap data structures, so needs to be grabbed a few times, many of them already documented in the comments. For review