From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E6C3B12E5D for ; Tue, 28 Jan 2025 01:07:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738026476; cv=none; b=rQpd+M4mUw+qYigE0zFq7YnggYMpmpStmm6TKrs9582gs/Unxfxc2g937hfpWm3Tn5kmQubWdgWq5fjjfw71rC8PunBGoCF50ULwuFHF0bPYEqJOaKbzXsLtRkqZpChg5accqtCQLtZhroEfN/GcLaZ+zMvHoIxhxPUhg7FI/TY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738026476; c=relaxed/simple; bh=WRh/SaErv3NSOrjLV96+P/lfswtBw2EKUEWeFOVZFAs=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=CnOd/rubkiibVM0r8E3q6fpFkz8ad8zWKrD1eFzwxbH+tjd7i+ldT4bBUn7Nstj0zLjGwm3BqvsT46XnX1VQB0M5Lh/o5TpB3CuYYcockXUOYK5mMFK6KlOg9mqW1SkGFbmkvRryXmezhBk4FKvXo1nvwB7VUaROvwDI88gu4/4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=jo1guj6p; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="jo1guj6p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 817E5C4CED2; Tue, 28 Jan 2025 01:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1738026475; bh=WRh/SaErv3NSOrjLV96+P/lfswtBw2EKUEWeFOVZFAs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jo1guj6pDXQKFvRy6RsUdrY6TOWPEyfS+BWCu1PJ8CTtwdBQjVtmYW+krcLWkN8NS 7alKcIShHXhV3iGQ6SPbdkpi+PEmnmpm94wAkMjZGys9JAEh+L+YwxSEyTzMmsIac2 KlnQCuzfs0Tay0Nsn37yLYKVoiqeBBBFxKPtWMKM= Date: Mon, 27 Jan 2025 17:07:54 -0800 From: Andrew Morton To: Michal Clapinski Cc: Vlastimil Babka , Pasha Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/2] mm/compaction: allow more aggressive proactive compaction Message-Id: <20250127170754.955ecfc1ed3249a027fbebce@linux-foundation.org> In-Reply-To: <20250127215020.4023545-1-mclapinski@google.com> References: <20250127215020.4023545-1-mclapinski@google.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 27 Jan 2025 22:50:18 +0100 Michal Clapinski wrote: > Our goal is to keep memory usage of a VM low on the host. For that > reason, we use free page reporting which by default reports free pages > of order 9 and larger to the host to be freed. The feature works well > only if the memory in the guest is not fragmented below pages of order > 9. Proactive compaction can be reused to achieve defragmentation after > some parameter tweaking. > > When the fragmentation score (lower is better) gets larger than the > high watermark, proactive compaction kicks in. Compaction stops when > the score goes below the low watermark (or no progress is made and > backoff kicks in). Let's define the difference between high and low > watermarks as leeway. Before these changes, the minimum possible value > for low watermark was 5 and the leeway was hardcoded to 10 (so minimum > possible value for high watermark was 15). > It would be helpful to let us know the benefits of this change for our users. Some reasonably detailed real-world before-and-after narrative would suit, please.