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.