From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFD93395DB3 for ; Wed, 14 Jan 2026 11:52:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768391567; cv=none; b=L3oJOlFdJBrI/cfqrV3ToUplhIxN++QcUXs0nvf2IphrHhIkW9QU3WxwNRwEtKOTf9UINk3uucogOx5yDZA+N8t4q0bN8rvYfXdkTTcqK3Awo5txzv40WAKQlE+RxXsCoLseF7ecMNblsv8kb486E3ya3Rd3wLbTFvigF+/yoTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768391567; c=relaxed/simple; bh=mVUk1DHTD5qet0rKePw/r5X6CFCfJv02HPqeIEflfQ0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Lflh87MAuIRuQ0yoD+YAH/4c0WFFrhiNb4upZDaNRxI7FRdGcsmDQlXr2nL8hVx4CazNYoZes+laOWxwX+6jxWXluOI3hWAWz7j8pzdPjV0ZcZAZG6LTjDlL3emPqJ7O2JwC1r8paiCr/XLc8+b4/pjJuAzqMeiZlrjh/rtr5ik= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=g8M9XsiZ; arc=none smtp.client-ip=91.218.175.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="g8M9XsiZ" Message-ID: <3ddb66f4-d3a8-4e94-8bae-ba65737a52b4@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1768391559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W7xSQF0mGpEu8TOyOO/LYfopVHPA4H43rsuLF6LlAVc=; b=g8M9XsiZxrjFp15Q1teXxp4hzG9J07BxK0fpaxR+g8fCiqoPBuvRK9cqClLeMn2C07PUb9 IWS5VF4I7ntmJAQe8stbKuQDwtBoS2j5JWCDWSEe1TJ6QptD4e5lIXA+dIkuMvjUWIvl7S VIHnANPvDFMXtipTM/WdVDZiv79Czi4= Date: Wed, 14 Jan 2026 19:52:24 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH mm-new v4 4/6] mm: add folio_is_lazyfree helper Content-Language: en-US To: "David Hildenbrand (Red Hat)" , Vernon Yang Cc: lorenzo.stoakes@oracle.com, ziy@nvidia.com, akpm@linux-foundation.org, dev.jain@arm.com, baohua@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vernon Yang References: <20260111121909.8410-1-yanglincheng@kylinos.cn> <20260111121909.8410-5-yanglincheng@kylinos.cn> <78a2ab5b-5ece-4d82-a229-594fb8672108@linux.dev> <40381c7e-3f0a-4459-a287-4e098e9a4b13@kernel.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Lance Yang In-Reply-To: <40381c7e-3f0a-4459-a287-4e098e9a4b13@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 2026/1/14 19:45, David Hildenbrand (Red Hat) wrote: > On 1/11/26 14:41, Lance Yang wrote: >> >> >> On 2026/1/11 20:19, Vernon Yang wrote: >>> Add folio_is_lazyfree() function to identify lazy-free folios to improve >>> code readability. >>> >>> Signed-off-by: Vernon Yang >>> --- >>>    include/linux/mm_inline.h | 5 +++++ >>>    mm/rmap.c                 | 2 +- >>>    mm/vmscan.c               | 5 ++--- >>>    3 files changed, 8 insertions(+), 4 deletions(-) >>> >>> diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h >>> index fa2d6ba811b5..65a4ae52d915 100644 >>> --- a/include/linux/mm_inline.h >>> +++ b/include/linux/mm_inline.h >>> @@ -35,6 +35,11 @@ static inline int page_is_file_lru(struct page *page) >>>        return folio_is_file_lru(page_folio(page)); >>>    } >>> +static inline int folio_is_lazyfree(const struct folio *folio) >>> +{ >> >> It's 2026, could we use bool instead of int? >> >> Yeah, I see folio_is_file_lru() uses int but that's legacy ... > > Right, and why not call the function folio_test_lazyfree() and move it > to page-flags.h? Yep, that's even better :)