Re: [PATCH] mm, zswap: don't touch the XArray lock if there is no entry to free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 18, 2024 at 01:40:18PM -0700, Yosry Ahmed wrote:
> Oh I thought xas_reload() is enough here to check that the entry is
> still there after the lock is acquired. Do we have to start the walk
> over after holding the lock?

Yes.  The entry is guaranteed to still be valid, but the node you're
looking in might have been freed, so you can't modify the node without
making sure the node is still in the tree.  We could make that cheaper
than a rewalk, but you're going to need to write that code since you're
the first to want to do something like this.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux