Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp67357pxt; Thu, 5 Aug 2021 18:11:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUtSuIyt9UAYkYxQQrcXd8xo9AgoC3pDImjwz5ejLfTdE2rc7Pa6CCtBEnchu0HHMib3G6 X-Received: by 2002:a05:6402:2043:: with SMTP id bc3mr10062250edb.62.1628212298084; Thu, 05 Aug 2021 18:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628212298; cv=none; d=google.com; s=arc-20160816; b=Z1x2XgbuQMbzoAhhTNFJHCsA9L2c7F39EwOGK5E7advH0UlDH2vfh7tEgHYN332z/r 9on68OKWqwpq7ebxqagUzXQrxP5RgFXHdLUhs+t4JUVJ9NXvyMzX8W8JPWqNlugJ2tdr Ad7lDRQqu+pVkN00jkP2b2mFKKWJrXemV7t8q/6KtxJM0jGC55YdCzkhYQs+VREF9FWz BiVDrVgVI+b+y8ji7B+cWMk0XPdKdEc/6KrOWP6Rocye34LZx8G6q+T3xOuexut4vfOy 3tEJ9W6CVLFdC2MVl+K+vR/PBxxOsl5jdqdIw17aBLib9T6s36Q9q7Kb/6olfhZWkPfi g38A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:reply-to :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=km9HG7d0aLbunQBTsj+FmyouAn5cvVzLddI+NBf1S5I=; b=KzkNJeQeMM4L4tIJPbYpfHzaomFiwiww2V0cj8T9WQzXWsZRbP+7nb2ughaYFGRPQy lKlJ862EyxcYbCVHn05vEKwVvbaxVm73IbkEbdiHXpbRFffcG/hWOfSZdnsMabSUg9eV w/5QhB8LWKxOORHkdjhAjMww1aoNYeAXawje/ZgiviLtOsjyxf4De3iqOqflwH9PVQZX zZvfEZuEeLRpWbvwI3s+1HZ0mIpx0GL9KwqHAdO7uC5sXh6oFOFSQx1rLcOxrEaDWuNb foISb58HSaGJ4ePBOo0ErbfLm0yNZ8yzp/v8Drn8ueVi/yV0dKTg/YdyMzXcG+5RK48Q kbrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sent.com header.s=fm1 header.b=Ca99plPm; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=AuCaNREa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sent.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si6911621ejj.667.2021.08.05.18.11.14; Thu, 05 Aug 2021 18:11:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sent.com header.s=fm1 header.b=Ca99plPm; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=AuCaNREa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sent.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242645AbhHETEV (ORCPT + 99 others); Thu, 5 Aug 2021 15:04:21 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:60747 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242220AbhHETEI (ORCPT ); Thu, 5 Aug 2021 15:04:08 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id B4D585810BA; Thu, 5 Aug 2021 15:03:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 05 Aug 2021 15:03:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=from :to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; s=fm1; bh=km9HG7d0aLbun QBTsj+FmyouAn5cvVzLddI+NBf1S5I=; b=Ca99plPmsBIKRdYO73L+eS0IcmVTU rQSzJdkmcEqNR+acpa6Ghbl6oZt0oiu25ZQXDo/sSV2PLXp/yIIMVcOlU1ylgFt9 c1YnNjK+GpDhW6pyK+lhlbNCxL7T6gdSvktHSfpfWtD0QhtPvdvjhKyVIhLvEinQ kykZMM3z7wSpTyOG7jdOdd3hUStmHdcdlPSag+1k8M+PL3HwtEO7e4YSaPmmM4yQ SJ+8Jk6nXsko2p98OHkZQxJJlRElU2hQuB7exc6I+oce3blx11SjUHbMMQTnayYh r9drJ3osSoKD2iDArGm22yqpzLb9yuYAwbPqcaGGRwPN7skJXVJp4k9pA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:reply-to:subject :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=km9HG7d0aLbunQBTsj+FmyouAn5cvVzLddI+NBf1S5I=; b=AuCaNREa il44gT/59h7oet5zTmexPudy5yoEZgJCPZQWT7Q0sj457+hvSUKjw8WYNRNeoFU+ 7AtmUotFAQvTWp6TIJU2XU72XE4rp8CtLlJWimlnYkacVl+0asDOKEVAsupxLJpn aMzazxF3PLktYouWanmoFUvzdaK2NtMaq4z4N5WkzG+ebCelp0jX+/bx+uJL76Ym pSsHMf+UCjzguTxJWmpDNAkmVRA9x67tWA0rZJF1rEpRXgl5hCPjc699yzI/lesD lrNYXf+930L/MK+heiyUvifpguRsDKx1s+vSWGVZh844Bb3aXkJk+SbK7fHV/bG6 /Y8xv55+X2nSew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrieelgddufedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfrhgggfestdhqredtredttdenucfhrhhomhepkghiucgj rghnuceoiihirdihrghnsehsvghnthdrtghomheqnecuggftrfgrthhtvghrnhepieejue dvueduuefhgefhheeiuedvtedvuefgieegveetueeiueehtdegudehfeelnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepiihirdihrghnsehsvg hnthdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 Aug 2021 15:03:53 -0400 (EDT) From: Zi Yan To: David Hildenbrand , linux-mm@kvack.org Cc: Matthew Wilcox , Vlastimil Babka , "Kirill A . Shutemov" , Mike Kravetz , Michal Hocko , John Hubbard , linux-kernel@vger.kernel.org, Zi Yan , "Michael S. Tsirkin" , Jason Wang , virtualization@lists.linux-foundation.org Subject: [RFC PATCH 10/15] virtio: virtio_balloon: use PAGES_PER_SECTION instead of MAX_ORDER_NR_PAGES. Date: Thu, 5 Aug 2021 15:02:48 -0400 Message-Id: <20210805190253.2795604-11-zi.yan@sent.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210805190253.2795604-1-zi.yan@sent.com> References: <20210805190253.2795604-1-zi.yan@sent.com> Reply-To: Zi Yan MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zi Yan It keeps the existing behavior when MAX_ORDER grows beyond a section. Signed-off-by: Zi Yan Cc: "Michael S. Tsirkin" Cc: David Hildenbrand Cc: Jason Wang Cc: virtualization@lists.linux-foundation.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- drivers/virtio/virtio_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloo= n.c index 47dce91f788c..de8d0355d827 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -36,7 +36,7 @@ #define VIRTIO_BALLOON_FREE_PAGE_ALLOC_FLAG (__GFP_NORETRY | __GFP_NOWARN = | \ __GFP_NOMEMALLOC) /* The order of free page blocks to report to host */ -#define VIRTIO_BALLOON_HINT_BLOCK_ORDER (MAX_ORDER - 1) +#define VIRTIO_BALLOON_HINT_BLOCK_ORDER (PFN_SECTION_SHIFT - 1) /* The size of a free page block in bytes */ #define VIRTIO_BALLOON_HINT_BLOCK_BYTES \ (1 << (VIRTIO_BALLOON_HINT_BLOCK_ORDER + PAGE_SHIFT)) --=20 2.30.2