From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFCD1C433F5 for ; Fri, 30 Sep 2022 06:01:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230060AbiI3GB5 (ORCPT ); Fri, 30 Sep 2022 02:01:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbiI3GBw (ORCPT ); Fri, 30 Sep 2022 02:01:52 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B497116C1D; Thu, 29 Sep 2022 23:01:51 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1134) id 5AA1020E0A4E; Thu, 29 Sep 2022 23:01:51 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5AA1020E0A4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1664517711; bh=qRoWZWlP4PyLwwF+NTY7O5tHe3fxjaFBPD6xLZ+mKKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=colrSgEc59NLFwQiwI2jCC5sN1D3He9ulH/DmgqQDdnA4f+alTCq0XYDNqrIDUVIA rKSYF9L6GI9w/1CxE0NRPiYV0D3i9nXbQW2bhlVyX+bcK7kTFQpJNOLXmT/M9Nxelj Xvu8C9bNQKzv+33IMROMgwG7io03DJgTLtG70DTk= From: Shradha Gupta To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Cc: Shradha Gupta , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , Michael Kelley Subject: [PATCH v2 0/2] Configurable order free page reporting in hyper-v Date: Thu, 29 Sep 2022 23:01:37 -0700 Message-Id: <1664517699-1085-1-git-send-email-shradhagupta@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1664447081-14744-1-git-send-email-shradhagupta@linux.microsoft.com> References: <1664447081-14744-1-git-send-email-shradhagupta@linux.microsoft.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In some scenarios Hyper-V needs to manage memory more tightly, so it needs as much information as possible about unused guest pages. To that end Hyper-V now allows free page reporting in chunks smaller than 2 Mbytes. Because of the performance tradeoffs, we want to make the chunk size configurable. Since there's already a free page reporting module parameter, let's use that rather than creating yet another parameter. Configurable order free page reporting is enabled in page_reporting driver in mm tree. However, changes need to be made in drivers like hyper-v's hv_balloon to make it aware of the page order. These patches add support for the same. In the page_reporting driver(patch 1) we export the page_reporting_order module parameter. Besides this, in the page_reporting module a check is added to ensure that whenever the page_reporting_order value is changed, it is within the prescribed limits. The hv_balloon side changes(patch 2) include consuming the exported page_reporting_order. Making changes in reporting these variable order free pages as cold discard hints to hyper-v and dropping and refining checks that restrict the order to a minimum of 9(default). --- Changes in v2 * Add more details in the cover letter about the motivation * Fix the threading between dependent patches Shradha Gupta (2): mm/page_reporting: Add checks for page_reporting_order param hv_balloon: Add support for configurable order free page reporting drivers/hv/hv_balloon.c | 94 ++++++++++++++++++++++++++++++++--------- mm/page_reporting.c | 50 +++++++++++++++++++--- 2 files changed, 118 insertions(+), 26 deletions(-) -- 2.37.2