[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <15247f54-53f3-83d4-6706-e9264b90ca7a@yandex-team.ru>
Date: Tue, 23 Oct 2018 08:11:31 +0300
From: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
To: Joe Perches <joe@...ches.com>, Arun KS <arunks@...eaurora.org>,
linux-kernel@...r.kernel.org, linux-mm <linux-mm@...ck.org>,
Minchan Kim <minchan@...nel.org>,
Michal Hocko <mhocko@...e.com>,
Arun Sudhilal <getarunks@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm: convert totalram_pages, totalhigh_pages and
managed_pages to atomic.
On 23.10.2018 7:15, 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.
>
> 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)
or proper static inline
this code isn't so low level for breaking include dependencies with macro
> #define totalram_pages_inc() (unsigned long)atomic_long_inc(&_totalram_pages)
> #define totalram_pages_dec() (unsigned long)atomic_long_dec(&_totalram_pages)
these are void
conversion zone->managed_pages should be split into separate patch
[dropped bloated cc - my server rejects this mess]
Powered by blists - more mailing lists