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

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

 



On 2018-10-23 09:45, Joe Perches wrote:
On Mon, 2018-10-22 at 22:53 +0530, Arun KS wrote:
Remove managed_page_count_lock spinlock and instead use atomic
variables.


Hello Joe,
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)

That sounds like a nice idea.

Regards,
Arun
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux