linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yuvraj Sakshith <yuvraj.sakshith@oss.qualcomm.com>
To: akpm@linux-foundation.org, mst@redhat.com, david@kernel.org
Cc: vbabka@suse.cz, surenb@google.com, mhocko@suse.com,
	jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com,
	linux-mm@kvack.org, jasowang@redhat.com,
	xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
	virtualization@lists.linux.dev, kys@microsoft.com,
	haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
	longli@microsoft.com, linux-hyperv@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] mm/page_reporting: Allow zero page_reporting_order
Date: Wed, 25 Feb 2026 23:01:23 -0800	[thread overview]
Message-ID: <20260226070125.3732265-2-yuvraj.sakshith@oss.qualcomm.com> (raw)
In-Reply-To: <20260226070125.3732265-1-yuvraj.sakshith@oss.qualcomm.com>

Some drivers might require page sized chunks to be
reported. This patch allows registering a driver with
order as  zero.

Example use case: virtio-balloon driver running on a
guest with very small memory. After some time has passed,
the guest might not be able to find a chunk of 8KB.

Signed-off-by: Yuvraj Sakshith <yuvraj.sakshith@oss.qualcomm.com>
---
 mm/page_reporting.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_reporting.c b/mm/page_reporting.c
index e4c428e61..fd7c5f0de 100644
--- a/mm/page_reporting.c
+++ b/mm/page_reporting.c
@@ -370,7 +370,7 @@ int page_reporting_register(struct page_reporting_dev_info *prdev)
 	 */
 
 	if (page_reporting_order == -1) {
-		if (prdev->order > 0 && prdev->order <= MAX_PAGE_ORDER)
+		if (prdev->order >= 0 && prdev->order <= MAX_PAGE_ORDER)
 			page_reporting_order = prdev->order;
 		else
 			page_reporting_order = pageblock_order;
-- 
2.34.1



  reply	other threads:[~2026-02-26  7:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26  7:01 [PATCH 0/3] Allow order zero pages in page reporting Yuvraj Sakshith
2026-02-26  7:01 ` Yuvraj Sakshith [this message]
2026-02-26  7:01 ` [PATCH 2/3] hv_balloon: Change default page reporting order Yuvraj Sakshith
2026-02-26  7:01 ` [PATCH 3/3] virtio_balloon: Set pr_dev.order to new default Yuvraj Sakshith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260226070125.3732265-2-yuvraj.sakshith@oss.qualcomm.com \
    --to=yuvraj.sakshith@oss.qualcomm.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=decui@microsoft.com \
    --cc=eperezma@redhat.com \
    --cc=haiyangz@microsoft.com \
    --cc=hannes@cmpxchg.org \
    --cc=jackmanb@google.com \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longli@microsoft.com \
    --cc=mhocko@suse.com \
    --cc=mst@redhat.com \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=virtualization@lists.linux.dev \
    --cc=wei.liu@kernel.org \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox