Re: [PATCH] mm: convert totalram_pages, totalhigh_pages and managed_pages to atomic.

From
Joe Perches <joe@perches.com>
Date
2018-10-23 10:55:57
Also in
kexec, linux-mediatek, linux-um
Reply to
Arun KS, 2018-10-23
On Mon, 2018-10-22 at 22:53 +0530, Arun KS wrote:
Remove managed_page_count_lock spinlock and instead use atomic
variables.
Perhaps better to define and use macros for the accesses
instead of specific uses of atomic_long_<inc/dec/read>

Something like:

#define totalram_pages()	(unsigned long)atomic_long_read(&_totalram_pages)
#define totalram_pages_inc()	(unsigned long)atomic_long_inc(&_totalram_pages)
#define totalram_pages_dec()	(unsigned long)atomic_long_dec(&_totalram_pages)
Thread (3 messages) 3 messages, 3 authors, last reply 2018-11-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help