virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] mm/balloon_compaction: make balloon page compaction callbacks static
       [not found] <20220125132221.2220-1-linmiaohe@huawei.com>
@ 2022-01-25 13:24 ` David Hildenbrand
  2022-01-25 17:56 ` Rafael Aquini
  2022-01-25 17:59 ` Michael S. Tsirkin
  2 siblings, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2022-01-25 13:24 UTC (permalink / raw)
  To: Miaohe Lin, akpm, mst; +Cc: linux-mm, linux-kernel, virtualization

On 25.01.22 14:22, Miaohe Lin wrote:
> Since commit b1123ea6d3b3 ("mm: balloon: use general non-lru movable page
> feature"), these functions are called via balloon_aops callbacks. They're
> not called directly outside this file. So make them static and clean up
> the relevant code.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Reviewed-by: David Hildenbrand <david@redhat.com>


-- 
Thanks,

David / dhildenb

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/balloon_compaction: make balloon page compaction callbacks static
       [not found] <20220125132221.2220-1-linmiaohe@huawei.com>
  2022-01-25 13:24 ` [PATCH] mm/balloon_compaction: make balloon page compaction callbacks static David Hildenbrand
@ 2022-01-25 17:56 ` Rafael Aquini
  2022-01-25 17:59 ` Michael S. Tsirkin
  2 siblings, 0 replies; 3+ messages in thread
From: Rafael Aquini @ 2022-01-25 17:56 UTC (permalink / raw)
  To: Miaohe Lin; +Cc: mst, linux-kernel, virtualization, linux-mm, akpm

On Tue, Jan 25, 2022 at 09:22:21PM +0800, Miaohe Lin wrote:
> Since commit b1123ea6d3b3 ("mm: balloon: use general non-lru movable page
> feature"), these functions are called via balloon_aops callbacks. They're
> not called directly outside this file. So make them static and clean up
> the relevant code.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  include/linux/balloon_compaction.h | 22 ----------------------
>  mm/balloon_compaction.c            |  6 +++---
>  2 files changed, 3 insertions(+), 25 deletions(-)
> 
> diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
> index 338aa27e4773..edb7f6d41faa 100644
> --- a/include/linux/balloon_compaction.h
> +++ b/include/linux/balloon_compaction.h
> @@ -80,12 +80,6 @@ static inline void balloon_devinfo_init(struct balloon_dev_info *balloon)
>  
>  #ifdef CONFIG_BALLOON_COMPACTION
>  extern const struct address_space_operations balloon_aops;
> -extern bool balloon_page_isolate(struct page *page,
> -				isolate_mode_t mode);
> -extern void balloon_page_putback(struct page *page);
> -extern int balloon_page_migrate(struct address_space *mapping,
> -				struct page *newpage,
> -				struct page *page, enum migrate_mode mode);
>  
>  /*
>   * balloon_page_insert - insert a page into the balloon's page list and make
> @@ -155,22 +149,6 @@ static inline void balloon_page_delete(struct page *page)
>  	list_del(&page->lru);
>  }
>  
> -static inline bool balloon_page_isolate(struct page *page)
> -{
> -	return false;
> -}
> -
> -static inline void balloon_page_putback(struct page *page)
> -{
> -	return;
> -}
> -
> -static inline int balloon_page_migrate(struct page *newpage,
> -				struct page *page, enum migrate_mode mode)
> -{
> -	return 0;
> -}
> -
>  static inline gfp_t balloon_mapping_gfp_mask(void)
>  {
>  	return GFP_HIGHUSER;
> diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
> index 907fefde2572..4b8eab4b3f45 100644
> --- a/mm/balloon_compaction.c
> +++ b/mm/balloon_compaction.c
> @@ -203,7 +203,7 @@ EXPORT_SYMBOL_GPL(balloon_page_dequeue);
>  
>  #ifdef CONFIG_BALLOON_COMPACTION
>  
> -bool balloon_page_isolate(struct page *page, isolate_mode_t mode)
> +static bool balloon_page_isolate(struct page *page, isolate_mode_t mode)
>  
>  {
>  	struct balloon_dev_info *b_dev_info = balloon_page_device(page);
> @@ -217,7 +217,7 @@ bool balloon_page_isolate(struct page *page, isolate_mode_t mode)
>  	return true;
>  }
>  
> -void balloon_page_putback(struct page *page)
> +static void balloon_page_putback(struct page *page)
>  {
>  	struct balloon_dev_info *b_dev_info = balloon_page_device(page);
>  	unsigned long flags;
> @@ -230,7 +230,7 @@ void balloon_page_putback(struct page *page)
>  
>  
>  /* move_to_new_page() counterpart for a ballooned page */
> -int balloon_page_migrate(struct address_space *mapping,
> +static int balloon_page_migrate(struct address_space *mapping,
>  		struct page *newpage, struct page *page,
>  		enum migrate_mode mode)
>  {
> -- 
> 2.23.0
> 
> 
Acked-by: Rafael Aquini <aquini@redhat.com>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/balloon_compaction: make balloon page compaction callbacks static
       [not found] <20220125132221.2220-1-linmiaohe@huawei.com>
  2022-01-25 13:24 ` [PATCH] mm/balloon_compaction: make balloon page compaction callbacks static David Hildenbrand
  2022-01-25 17:56 ` Rafael Aquini
@ 2022-01-25 17:59 ` Michael S. Tsirkin
  2 siblings, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2022-01-25 17:59 UTC (permalink / raw)
  To: Miaohe Lin; +Cc: linux-mm, akpm, virtualization, linux-kernel

On Tue, Jan 25, 2022 at 09:22:21PM +0800, Miaohe Lin wrote:
> Since commit b1123ea6d3b3 ("mm: balloon: use general non-lru movable page
> feature"), these functions are called via balloon_aops callbacks. They're
> not called directly outside this file. So make them static and clean up
> the relevant code.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

I'll queue this unless someone else does first.

> ---
>  include/linux/balloon_compaction.h | 22 ----------------------
>  mm/balloon_compaction.c            |  6 +++---
>  2 files changed, 3 insertions(+), 25 deletions(-)
> 
> diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
> index 338aa27e4773..edb7f6d41faa 100644
> --- a/include/linux/balloon_compaction.h
> +++ b/include/linux/balloon_compaction.h
> @@ -80,12 +80,6 @@ static inline void balloon_devinfo_init(struct balloon_dev_info *balloon)
>  
>  #ifdef CONFIG_BALLOON_COMPACTION
>  extern const struct address_space_operations balloon_aops;
> -extern bool balloon_page_isolate(struct page *page,
> -				isolate_mode_t mode);
> -extern void balloon_page_putback(struct page *page);
> -extern int balloon_page_migrate(struct address_space *mapping,
> -				struct page *newpage,
> -				struct page *page, enum migrate_mode mode);
>  
>  /*
>   * balloon_page_insert - insert a page into the balloon's page list and make
> @@ -155,22 +149,6 @@ static inline void balloon_page_delete(struct page *page)
>  	list_del(&page->lru);
>  }
>  
> -static inline bool balloon_page_isolate(struct page *page)
> -{
> -	return false;
> -}
> -
> -static inline void balloon_page_putback(struct page *page)
> -{
> -	return;
> -}
> -
> -static inline int balloon_page_migrate(struct page *newpage,
> -				struct page *page, enum migrate_mode mode)
> -{
> -	return 0;
> -}
> -
>  static inline gfp_t balloon_mapping_gfp_mask(void)
>  {
>  	return GFP_HIGHUSER;
> diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
> index 907fefde2572..4b8eab4b3f45 100644
> --- a/mm/balloon_compaction.c
> +++ b/mm/balloon_compaction.c
> @@ -203,7 +203,7 @@ EXPORT_SYMBOL_GPL(balloon_page_dequeue);
>  
>  #ifdef CONFIG_BALLOON_COMPACTION
>  
> -bool balloon_page_isolate(struct page *page, isolate_mode_t mode)
> +static bool balloon_page_isolate(struct page *page, isolate_mode_t mode)
>  
>  {
>  	struct balloon_dev_info *b_dev_info = balloon_page_device(page);
> @@ -217,7 +217,7 @@ bool balloon_page_isolate(struct page *page, isolate_mode_t mode)
>  	return true;
>  }
>  
> -void balloon_page_putback(struct page *page)
> +static void balloon_page_putback(struct page *page)
>  {
>  	struct balloon_dev_info *b_dev_info = balloon_page_device(page);
>  	unsigned long flags;
> @@ -230,7 +230,7 @@ void balloon_page_putback(struct page *page)
>  
>  
>  /* move_to_new_page() counterpart for a ballooned page */
> -int balloon_page_migrate(struct address_space *mapping,
> +static int balloon_page_migrate(struct address_space *mapping,
>  		struct page *newpage, struct page *page,
>  		enum migrate_mode mode)
>  {
> -- 
> 2.23.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-25 17:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220125132221.2220-1-linmiaohe@huawei.com>
2022-01-25 13:24 ` [PATCH] mm/balloon_compaction: make balloon page compaction callbacks static David Hildenbrand
2022-01-25 17:56 ` Rafael Aquini
2022-01-25 17:59 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).