From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) (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 5E3CB1F7575 for ; Tue, 21 Apr 2026 00:59:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776733147; cv=none; b=okLjKQ68WWC2c+XfeR6pkMCaOCVLNW4Zdl7Kjr6PwnRLUWGYWE8d7iu1FQz3C8cnflsckde5QCdiyRz3bQyEmNsAK/Tg4drRZaVGsWMpjEBbpS1lmmVbF5218rHwKNJPoPtfDWPf+punN4h+CQRzQkbVWTYWzdmX4BaiLNFCLCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776733147; c=relaxed/simple; bh=6C73BwFjiB4Uhl+iXeqGHDpJY45ehmJvEvP3w2YzlwM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=GHX2kLL0XISIq51MVzum+YZJ7+zPT0NV1cGaQMauCFXRBa3TXtmMitGWgrzQvQmQLx0FdT1HRiXdMnVoe5bv0DQAbZYfHVHKWWYnKblM5e4t1T0yoiSSl/G2h8tj3UU77OQN3wHakraIxmw83p/nKPzkB7FQFL3L6me9WYNWFvY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=RguoVPRK; arc=none smtp.client-ip=115.124.30.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="RguoVPRK" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1776733142; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=7yi+xUZCUd5yeE272YJMQ5iJ3vo6smTP4Z4GqGgtzU4=; b=RguoVPRKAQbcH2h0/QWfnQtOzTdRCnmcfM0RzqxiQtcq56cyUN+Ff1svS1CkwBqiozM1adJS1Slu1QBphIA9w2IZkoB49D5GaDsY3gArAdXXc0j2ehL7orVFkAmyXyQUrO7XGToT0nWUHwGrdwpIH/biGAOGJ3vC+aErbpPMEHg= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037026112;MF=ying.huang@linux.alibaba.com;NM=1;PH=DS;RN=23;SR=0;TI=SMTPD_---0X1RC5RC_1776733139; Received: from DESKTOP-5N7EMDA(mailfrom:ying.huang@linux.alibaba.com fp:SMTPD_---0X1RC5RC_1776733139 cluster:ay36) by smtp.aliyun-inc.com; Tue, 21 Apr 2026 08:59:00 +0800 From: "Huang, Ying" To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, Andrew Morton , David Hildenbrand , Vlastimil Babka , Brendan Jackman , Michal Hocko , Suren Baghdasaryan , Jason Wang , Andrea Arcangeli , linux-mm@kvack.org, virtualization@lists.linux.dev, Johannes Weiner , Zi Yan , Lorenzo Stoakes , "Liam R. Howlett" , Mike Rapoport , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , Alistair Popple Subject: Re: [PATCH RFC v2 02/18] mm: add pghint_t type and vma_alloc_folio_hints API In-Reply-To: <290d615a001cf121dc0c604eb79451bcc7917baa.1776689093.git.mst@redhat.com> (Michael S. Tsirkin's message of "Mon, 20 Apr 2026 08:50:23 -0400") References: <290d615a001cf121dc0c604eb79451bcc7917baa.1776689093.git.mst@redhat.com> Date: Tue, 21 Apr 2026 08:58:59 +0800 Message-ID: <87pl3ti0x8.fsf@DESKTOP-5N7EMDA> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ascii "Michael S. Tsirkin" writes: > Add pghint_t, a bitwise type for communicating page allocation hints > between the allocator and callers. Define PGHINT_ZEROED to indicate > that the allocated page contents are known to be zero. > > Add _hints variants of the allocation functions that accept a > pghint_t *hints output parameter: > > vma_alloc_folio_hints() -> folio_alloc_mpol_hints (internal) > -> __alloc_frozen_pages_hints() > > The existing APIs are unchanged and continue to work without hints. > For now, hints is always initialized to 0. A subsequent patch will > set PGHINT_ZEROED when the page was pre-zeroed by the host. Why do we need this feature? Is there any performance impact? If so, please provide some performance data. [snip] --- Best Regards, Huang, Ying