Thread (20 messages) 20 messages, 4 authors, 2020-02-10

Re: [PATCH v5 04/12] mm: introduce page_ref_sub_return()

From: Kirill A. Shutemov <hidden>
Date: 2020-02-07 13:17:58
Also in: linux-fsdevel, linux-kselftest, linux-mm, linux-rdma, lkml

On Thu, Feb 06, 2020 at 07:37:27PM -0800, John Hubbard wrote:
An upcoming patch requires subtracting a large chunk of refcounts from
a page, and checking what the resulting refcount is. This is a little
different than the usual "check for zero refcount" that many of the
page ref functions already do. However, it is similar to a few other
routines that (like this one) are generally useful for things such as
1-based refcounting.

Add page_ref_sub_return(), that subtracts a chunk of refcounts
atomically, and returns an atomic snapshot of the result.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Kirill A. Shutemov <redacted>

-- 
 Kirill A. Shutemov
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help