From patchwork Fri Jan 24 18:21:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Clapinski X-Patchwork-Id: 13949816 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F20ACC02181 for ; Fri, 24 Jan 2025 18:21:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83345280089; Fri, 24 Jan 2025 13:21:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E34D280079; Fri, 24 Jan 2025 13:21:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6AAD1280089; Fri, 24 Jan 2025 13:21:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 43A9B280079 for ; Fri, 24 Jan 2025 13:21:48 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id EF00F1A0640 for ; Fri, 24 Jan 2025 18:21:47 +0000 (UTC) X-FDA: 83043163854.23.2897190 Received: from mail-ej1-f74.google.com (mail-ej1-f74.google.com [209.85.218.74]) by imf11.hostedemail.com (Postfix) with ESMTP id 39A3140011 for ; Fri, 24 Jan 2025 18:21:45 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="gwgQ4/MR"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf11.hostedemail.com: domain of 3ONqTZwoKCH8pfodslqvnljrrjoh.frpolqx0-ppnydfn.ruj@flex--mclapinski.bounces.google.com designates 209.85.218.74 as permitted sender) smtp.mailfrom=3ONqTZwoKCH8pfodslqvnljrrjoh.frpolqx0-ppnydfn.ruj@flex--mclapinski.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737742906; a=rsa-sha256; cv=none; b=TjEEIZzYTv6IVnXXU2bPkFQ5gtwMVtLrLNVGN7DBVJAhbSuyccTWu/F4SuP17YqrLRxC2p Ob6wIgmk0IQF71mb/F8StoLdscRv3D3cEpff8zYASWVnG4iDf+ry0MCSpHDFkgaaq4eBV7 YovSt/A5UJGgxdX7ARaHx4YERS+epxg= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="gwgQ4/MR"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf11.hostedemail.com: domain of 3ONqTZwoKCH8pfodslqvnljrrjoh.frpolqx0-ppnydfn.ruj@flex--mclapinski.bounces.google.com designates 209.85.218.74 as permitted sender) smtp.mailfrom=3ONqTZwoKCH8pfodslqvnljrrjoh.frpolqx0-ppnydfn.ruj@flex--mclapinski.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737742906; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=6nEIs0r3JonLCfjtAGXsINqZTDb7ARzRaiuj/8Ymddk=; b=7i38V49g2JLIZkk/z41mL+5W3Mocq6nWThAkP9XuPXY6cmbC1gWGWUD/NjZrcmz4yzFHCT Nx+U2vew3rE0thgriTWwlBVJAOtGem4rvBd2QnypzO7SMMnlp8LeJHQfFVpaTb+FsAJiwD 2pYHDiCCfjH1myKCalVkB8bu/7egx6o= Received: by mail-ej1-f74.google.com with SMTP id a640c23a62f3a-ab45150a216so331848566b.0 for ; Fri, 24 Jan 2025 10:21:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737742904; x=1738347704; darn=kvack.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=6nEIs0r3JonLCfjtAGXsINqZTDb7ARzRaiuj/8Ymddk=; b=gwgQ4/MRrixGjgvlKtT42/vIm5stOvE5wdyD+9An/Q/Uyuv4aYpIrd70obUqn+GY7z exdkHl0NGSdqb4VGIAx0yxJnU7lziu09z/0F8BzkxRjO7EdIGwvIqbhKd0bgQ9+4Rhsx C7lF+m0EeQjyiLjb/Vqz2qDtPen0mIli2TDT7wYhaX1rMoySCbZfy7wuhfq9FbkrinBL RiVJeSand3IaGblmqcp2qhak2JO/LbKeTo/dYJX24txuaiBTPLSTly4TyC2/KCkfA9FS EsnhJChsIdxmgWTzX8N2tP+uz4TNnB8D29enkBIPJhlMtoG63FCTukGJdALGwzjs5vgq NMnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737742904; x=1738347704; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6nEIs0r3JonLCfjtAGXsINqZTDb7ARzRaiuj/8Ymddk=; b=i1bIVuA5EMpnLwu23kBCe9M+C18Ivj7qj+Yl7AZAZ1BA7giMngIkd2uQ9eX+f72NQW E+mhfPV28gfISmcYo3SQ7ZJ9UgFKfM2CK/pieOeIcR5T3fIYyMvEmTlIMrnOBOAeAniE Hxb9CANrvXMMo40wGGDpppxsPGbBKTG7fgB4ZNBy4TD9b+mp6efGZOQOxai22Vh9hpeP mTcNTASdAUZNNW60Q8kHjba4/RvK4IVZxOF5tfLY2R5Vxd3j/Qq4hyG6qTO8ScZ9P//f GCmZdOrK3LetQNzDDuz1zfYNAGKp8AOlaqF0fDHlHJxlw5r2T88xIDuL0Y18KAihl7jx +Ftg== X-Gm-Message-State: AOJu0YwgVjL5g+UpTGljEsNPtE/Q48R2sfgUjDJAjMFG/j1hXgRWWCUp 8zI8D6Ij0oNBDTxj5kNagGGj2D1gCSXd8LT355uyp1gKSGEV8Tg6GxMuSOAYPVWrD4N0Q0zPmfI XfMUeM3g+/p5M9u1z0A== X-Google-Smtp-Source: AGHT+IGuWonX3XySIQ9XUlzczKpcpHaZoxCIXdwisIR9rEPdwsqzXQ+CjBIF9pCdilhKTk+lwcRnRuyi46uY5jlj X-Received: from ejey16.prod.google.com ([2002:a17:906:29d0:b0:ab3:a10b:a24f]) (user=mclapinski job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:60cf:b0:ab2:c0b9:68d with SMTP id a640c23a62f3a-ab38b1e2087mr3075980666b.1.1737742904633; Fri, 24 Jan 2025 10:21:44 -0800 (PST) Date: Fri, 24 Jan 2025 19:21:38 +0100 Mime-Version: 1.0 X-Mailer: git-send-email 2.48.1.262.g85cc9f2d1e-goog Message-ID: <20250124182140.2243862-1-mclapinski@google.com> Subject: [PATCH 0/2] mm/compaction: allow more aggressive proactive compaction From: Michal Clapinski To: Andrew Morton , Nitin Gupta , Pasha Tatashin Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Clapinski X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 39A3140011 X-Stat-Signature: nt6f7es8s6zmig1jk6cmniekh1mo7u64 X-HE-Tag: 1737742905-197291 X-HE-Meta: U2FsdGVkX18Ol9DTvqhJdCcxi0aY+f0UELmEiWAlV4AD281VYgXt9I3iLLVYgg/rfUn9GQvFgmUqSpu6X2QhBh+jypLanZRQJde+7eqrX4uw9JjMLVtFGjDCjLhLlDusiDegIBG5s8IxfnsfO7HIb3uUsRctAjA+TTmD+EmvnbmCEFonMs2o1dh02508UldLk0UmbxsvTo1PI65bKpU8uhOdzkH8DpGHvcddgAxVP5yLDhNDlwptjBo5PrSwacdnDMVNKoFc2ZLz9T01V0evAsz7othO7O2p6mbainT0TXt+WNTXY2hWonqRxR40DKXNOYi3s0Mgvw50aerAVlNkhxbHizsVQTLnoW9xbbzygp4+RxxeHBYSqwxpNSLBAonEsPr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fGD/2DPY7vtNAonKgrzp1VtijLW5wvgfjcR9rWBzHCj5k7Dsj0vk4CtGe8795nl9ft825XQs/Uk5nT6ecojeVxPEEQJyyvAl0x73iPWGtp/Coz8FOww= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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. Michal Clapinski (2): mm/compaction: remove low watermark cap for proactive compaction mm/compaction: expose a new param for proactive compaction mm/compaction.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)