Subject: Re: [PATCH] tun: avoid high-order page allocation for packet header

From: Jakub Kicinski <[email-masked]>
Date: Mon, 31 Jul 2023 13:58:54 -0700

On Tue, 25 Jul 2023 20:09:36 -0700 Tahsin Erdogan wrote:
> @@ -1838,6 +1838,9 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
>  			 */
>  			zerocopy = false;
>  		} else {
> +			if (linear == 0)
> +				linear = min_t(size_t, good_linear, copylen);

nit: would you mind changing to !linear instead of linear == 0 ?

Also - I don't see linear explicitly getting set to 0. What guarantees
that? What's the story there?

Otherwise seems reasonable. One more allocation but hopefully nobody
will notice.
-- 
pw-bot: cr