Re: [PATCH] mm: Support order-1 folios in the page cache

Yosry Ahmed
2023-12-06T21:07:41Z

[..]
> @@ -2836,7 +2844,12 @@ void deferred_split_folio(struct folio *folio)
> #endif
> unsigned long flags;
>
> - VM_BUG_ON_FOLIO(folio_order(folio) < 2, folio);
> + /*
> + * Order 1 folios have no space for a deferred list, but we also
> + * won't waste much memory by not adding them to the deferred list.
> + */
> + if (folio_order(folio) <= 1)
> + return;

Would it be clearer if we have a folio_has_deferred_list() helper that
has the check and the comment, instead of having this comment here and
commentless checks elsewhere (or repeating the comment)?