[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <792ea136-4fa0-c87b-9399-5ca47c501c9c@linux.alibaba.com>
Date: Wed, 23 Oct 2019 10:57:44 -0700
From: Yang Shi <yang.shi@...ux.alibaba.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: hughd@...gle.com, aarcange@...hat.com,
kirill.shutemov@...ux.intel.com, gavin.dg@...ux.alibaba.com,
akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [v2 PATCH] mm: thp: handle page cache THP correctly in
PageTransCompoundMap
On 10/23/19 10:24 AM, Matthew Wilcox wrote:
> On Thu, Oct 24, 2019 at 01:05:04AM +0800, Yang Shi wrote:
>> + return map_count >= 0 &&
>> + map_count == atomic_read(&head[1].compound_mapcount);
>> }
> I didn't like Hugh's duplicate definition either. May I suggest:
Thanks, Willy. It is fine to me. Will take it in v3.
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 2f2199a51941..3d0efd937d2b 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -695,11 +695,6 @@ static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
>
> extern void kvfree(const void *addr);
>
> -static inline atomic_t *compound_mapcount_ptr(struct page *page)
> -{
> - return &page[1].compound_mapcount;
> -}
> -
> static inline int compound_mapcount(struct page *page)
> {
> VM_BUG_ON_PAGE(!PageCompound(page), page);
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 2222fa795284..270aa8fd2800 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -221,6 +221,11 @@ struct page {
> #endif
> } _struct_page_alignment;
>
> +static inline atomic_t *compound_mapcount_ptr(struct page *page)
> +{
> + return &page[1].compound_mapcount;
> +}
> +
> /*
> * Used for sizing the vmemmap region on some architectures
> */
Powered by blists - more mailing lists