lkml.org 
[lkml]   [2017]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [HMM 08/15] mm/ZONE_DEVICE: special case put_page() for device private pages
On Mon, May 22, 2017 at 12:51:59PM -0400, Jérôme Glisse wrote:
> A ZONE_DEVICE page that reach a refcount of 1 is free ie no longer
> have any user. For device private pages this is important to catch
> and thus we need to special case put_page() for this.
>
> Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
> ---
> include/linux/mm.h | 30 ++++++++++++++++++++++++++++++
> kernel/memremap.c | 1 -
> 2 files changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index a825dab..11f7bac 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -23,6 +23,7 @@
> #include <linux/page_ext.h>
> #include <linux/err.h>
> #include <linux/page_ref.h>
> +#include <linux/memremap.h>
>
> struct mempolicy;
> struct anon_vma;
> @@ -795,6 +796,20 @@ static inline bool is_device_private_page(const struct page *page)
> return ((page_zonenum(page) == ZONE_DEVICE) &&
> (page->pgmap->type == MEMORY_DEVICE_PRIVATE));
> }
> +
> +static inline void put_zone_device_private_page(struct page *page)

Could you measure how much bloat this change produce?

I would rather make put_zone_device_private_page() non-inline. put_page()
is inlined everewhere. It's beneficial to keep it skinny.

(And I guess it would help solving 0-day reporeted build issue).

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2017-05-23 15:24    [W:1.983 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site