From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sg-1-102.ptr.blmpb.com (sg-1-102.ptr.blmpb.com [118.26.132.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1851A29D28B for ; Fri, 26 Dec 2025 09:48:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.26.132.102 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766742521; cv=none; b=JzYX7Eu/rKmpIbdBbneVm6t60+n94L9dWItgw2M0aE7oNJfsmkG8G/4mKnQI0BnroEBEqZnTS0BBgs+p1Zg9ZEIDEpfA0tExjzdSE0pblg02h1RnvnIa22hFoFhMZfTe6+MOczYcSaIqtIAzUaN5AAIs7Vc7nYwJ7w5XMh5mftM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766742521; c=relaxed/simple; bh=g/NpJb/WHVcqak5ybUaWL7+vPYPG821SYjdmQiEBSlI=; h=Cc:References:Content-Type:Date:Mime-Version:In-Reply-To:To:From: Subject:Message-Id; b=CWNV+DoNu7OmbQ1nCTqOsyTylXVHKXfqmMLS6ZGQKTyh1RxSdhgOVYJ2Mr+ynZA5vTO2tXVJudl/LUZHKe90aHaYnCZPt2gfYXEE8tm6RHmLBaov2I7jUYgfOAb62zku+FNNklN+fM7Z9BtOowJNB5OldWPbxG8SIsjznzN33Ug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=XxnHTnzk; arc=none smtp.client-ip=118.26.132.102 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="XxnHTnzk" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1766742506; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=u3AO83U5tFZnsjnaXnFIQ6cNSEJBUHuzzrUUDaeTRII=; b=XxnHTnzklg4S0JZKWlnQRDy98w1iZwxzduLhLwg+QTL4G9txD5A5jgjEddfqM+Ybr/YNSD +6yirU060Nrh9nUB3vV3Rbkul93fCl3Hc0yndr8bbIohQ1c3sV0YE7HpV9m83OGVjhqid2 wns3OUhsXVd7+aZs1tQrqtgGOPzglTdpt778tiTRszi3Ms5Zo2xYIzghrQQJrdzmTXfMi3 +4WeTPxJMovYMEWovoHPdFpdb5ssAm9X8ht5vPn/ewMUAK3wpOYct8QO2+AGH/oVoB8Eu/ 3Bfnb3BYRR/P165kM9I4kujXcejLdes3on/1Vn6ufybWsalB98yDuIIMHH0a/Q== Cc: , , , , , , , X-Lms-Return-Path: X-Original-From: Li Zhe References: <46bf07b6-633f-43b8-8e2b-b08d437494b9@amd.com> Content-Type: text/plain; charset=UTF-8 Date: Fri, 26 Dec 2025 17:48:10 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: git-send-email 2.45.2 In-Reply-To: <46bf07b6-633f-43b8-8e2b-b08d437494b9@amd.com> To: From: "Li Zhe" Subject: Re: [PATCH 1/8] mm/hugetlb: add pre-zeroed framework Message-Id: <20251226094810.16013-1-lizhe.67@bytedance.com> On Fri, 26 Dec 2025 14:54:17 +0530, raghavendra.kt@amd.com wrote: > > +/* > > + * Once a page has been taken off the freelist, the new page owner > > + * must wait for the pre-zero thread to finish if it happens > > + * to be working on this page (which should be rare). > > + */ > > +static void hpage_wait_zeroing(struct hstate *h, struct folio *folio) > > +{ > > + if (!folio_test_hugetlb_zeroing(folio)) > > + return; > > + > > + spin_lock_irq(&hugetlb_lock); > > + > > + wait_event_cmd(h->dqzero_wait[folio_nid(folio)], > > + !folio_test_hugetlb_zeroing(folio), > > + spin_unlock_irq(&hugetlb_lock), > > + spin_lock_irq(&hugetlb_lock)); > > + > > + spin_unlock_irq(&hugetlb_lock); > > +} > > + > > nit: > May be simple enough chunk to introduce guard() above Thank you for the reminder. I will address this issue in v2. Thanks, Zhe