Re: [PATCH] mm/zblock: use vmalloc for page allocations
From: Sergey Senozhatsky
Date: Thu May 08 2025 - 02:33:32 EST
On (25/05/08 15:17), Sergey Senozhatsky wrote:
> On (25/05/07 23:00), Christoph Hellwig wrote:
> > On Thu, May 08, 2025 at 02:58:14PM +0900, Sergey Senozhatsky wrote:
> > > Oh, I didn't realize that zram was the only swap_slot_free_notify
> > > user. zram already handles REQ_OP_DISCARD/REQ_OP_WRITE_ZEROES so
> > > I guess only swap-cluster needs some work. Are there any
> > > blockers/complications on the swap-cluster side?
> >
> > I think the reason it was added it was so that the discard can be
> > done non-blocking with a spinlock held. Which seems a bit sketch
> > when calling into a driver anyway..
>
> swap_slot_free_notify is not guaranteed to free anything on the zram/zsmalloc
> side. zram attempts to trylock entry
.. I keep forgetting that slot-free can be called from an IRQ. That's
some complication.