Re: [PATCH v5 04/13] mm/khugepaged: make hugepage allocation context-specific

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

 



On Wed, 4 May 2022, Zach O'Keefe wrote:

> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index c94bc43dff3e..6095fcb3f07c 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -92,6 +92,10 @@ struct collapse_control {
>  
>  	/* Last target selected in khugepaged_find_target_node() */
>  	int last_target_node;
> +
> +	struct page *hpage;
> +	int (*alloc_charge_hpage)(struct mm_struct *mm,
> +				  struct collapse_control *cc);
>  };
>  
>  /**

Embedding this function pointer into collapse_contol seems like it would 
need some pretty strong rationale.  Not to say that it should be a 
non-starter, but I think the changelog needs to clearly indicate why this 
is better/cleaner than embedding the needed info for a single allocation 
and charge function to use.  If the callbacks would truly be so different 
that unifying them would be more complex, I think this makes sense.




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

  Powered by Linux