Re: [PATCH 31/31] mm, vmstat: Remove zone and node double accounting by approximating retries

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

 



On Wed, Jul 06, 2016 at 11:12:52AM -0700, Dave Hansen wrote:
> On 07/01/2016 01:01 PM, Mel Gorman wrote:
> > +#ifdef CONFIG_HIGHMEM
> > +extern unsigned long highmem_file_pages;
> > +
> > +static inline void acct_highmem_file_pages(int zid, enum lru_list lru,
> > +							int nr_pages)
> > +{
> > +	if (is_highmem_idx(zid) && is_file_lru(lru))
> > +		highmem_file_pages += nr_pages;
> > +}
> > +#else
> 
> Shouldn't highmem_file_pages technically be an atomic_t (or atomic64_t)?
>  We could have highmem on two nodes which take two different LRU locks.

It would require a NUMA machine with highmem or very weird
configurations but sure, atomic is safer.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



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