From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C68D52949E0 for ; Wed, 8 Jul 2026 16:03:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.128.44 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783526614; cv=pass; b=CKc4LCYNPgmp+yzqhW5vFLnbtWNCj5axLADLceVw1bzBblFd2wPdyQZ8F98iEl8CV4ERj7zycZtvCfX51E307COoPAZhHR5BNRQ7JYq+TvF01DCBfv185P9kxs+XVrcVwvCR+SUdoTvyq1eXaoLi5kr0Mi+yuG3br1zKCStRvQg= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783526614; c=relaxed/simple; bh=A9k15NC2tu6GIqgaUNafNWbmC+Zeria+kWA/766+euo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MemltWjeUqAMIvBoru9LI7hkGAtq191jNbHpnnpU7v5LVQnz3a+wMol9mo5LDiG5W6c/GjAFlV6ayZvjhg4BWM3dJWbwBOLr6Mtmmd70dmm5luTHx/KugA2cXvJcM/qFkALT22i2LxTlJmzmmW7HB/Gkb9QEzupibSXobcZNqtI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=fp7z9K+4; arc=pass smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="fp7z9K+4" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-493be0fbcc5so67795e9.0 for ; Wed, 08 Jul 2026 09:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783526611; cv=none; d=google.com; s=arc-20260327; b=b3DTIMnCGvHcC/KWfgaOFkp3opJeR0m9dnNDvQBSh5nGOHKdsqqPTwPPMe5Bv9B8TZ 1GO3RKHKVj7W0CJf4LCn4RWHNlA8o2GHI8TlEEGXl8iPwxDtzX4rrcSEw8LMX+lVinCu JIszGspk7Wry8ZCSfeaF5hdxXZckmKJ9uVpAaZjJSEmGII49RLblihSrD8pWEUXfR+i0 GmQX1pM18xV5EPbcZh61yu+phjCVBzEPHqQjbd84XY/NXAf0gpARuZU81YFx5gqCFCJc PGNSKBzAT69oIW9Kkcb8cZfq4aElNBmfY9JeGeLFs14+zAW2RdwnSkDj2V8V6JdFCG84 sTYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=A9k15NC2tu6GIqgaUNafNWbmC+Zeria+kWA/766+euo=; fh=ag8t/T/vtbXz7RICLaG/T8VNcLdB10TruSuZob+M5ks=; b=KWaPaLGIbk7khc/mHiqf8PYVf+JpM1gUFBQttF3Ef93bC6lZ8k7nI0RIBPNUIO++FJ WqwC7l+a/nTIU3z6JKSg7rt3Kx7bB6EwhNolPzRQkPTrXU3fB6QRVMBi9sM/mRE93Bat MMy6rDZyaDCJE3lCeAbQmsrseevBYls7lROv02R+J33qBE79rqIJxAvJC2xHMMh13MdG eD2S9qNpZ8L8ApXxgQDtSsa6xKzyz1XJ8KKdNLGpEamZlLspI8SLMZzUbKKcYsooCGat NO1Aj93Y9/ADU94b1IQNOQ77BvKpqu5xBxmAsSIJS4mr0TX2n8BhX4WZpiDKZM96Yd6U 5xxA==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783526611; x=1784131411; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to:content-type; bh=A9k15NC2tu6GIqgaUNafNWbmC+Zeria+kWA/766+euo=; b=fp7z9K+470TYsAWx/2KPU8Jwf70UHGitF+ChY+k9Th4one72QcXY5A8PEo3cbxwYPn VSnoFQLh/8KYfaq2sb4ZiVMW59LZ9RbAwyE4LGJuil+tzGDehgZrK+KvTGJViTVfTHks hwXq+Ox0NKWzm5q3q+FsHah4tEDxUa2IrJ4161Vj3ALcQ1asJeiWX837RUf/EPgeUsIO QhHalU5EfDHZ+686cXaPCagHY9J8jDStmc9ZQufXSMJhUjU/cjHCZcsbzIpjzxDaAAPt sk01QOLOc2+v4xotBG1bm3j2Ja/FjMZ/6HnhhMzXDxNmaBIhHanWBxneNEnT8WxXXNo9 +Aig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783526611; x=1784131411; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=A9k15NC2tu6GIqgaUNafNWbmC+Zeria+kWA/766+euo=; b=LqZgIXWoxO4fA7UgkjF8zGHDY4aE8P1ZRv2DcJ4CJbvqPJyDkBl4Pcip/oO1Vz432p pMlF85DzYtNk4kgiGyV4AOpjbZ8ARyk4S/OH01wLrVZcDp/huRMfb+tmhkZ1VnrFSRiu OgNaxinLOMtq0vQHv9f6R+JjBt0Kgm09o8YRMknOOY/wPE3sn0+ja6yVfMZPbOqb+VMO 7rdhLZXh8s3tWlOVByBtNWZ8ab0xYD8S8x8R7Nunb52kcJ6/0nziKY1wOBFGItJciqf2 pPSUoF03KiDvc8Bj1yx7w0rqENG61yTjfRgO/rGB0kAmAGRr5xADXB/cpH/pS48GwUEc 3nEw== X-Forwarded-Encrypted: i=1; AHgh+RpvEqPQsptTJei4AWqRYOZ9yXn4T6fv2GhUtJL6vYwYB8Z9jwC8nEuPAin/yvbLYxzKNEVQ8gG3shVc8A0=@vger.kernel.org X-Gm-Message-State: AOJu0YwvpW1aSmkVUoJLD71kyDnyWu/C91P25UktszOQfpm6BWyWHwnb lKchiSrlrgMzUiv22wthAKEo6rmcJ0420vvDpeAIiiFdypirSFARPQzp9qMke1DDXTzcpXfIaGA MMXoQ0B7//SUOcRGgQBkF31TuuwlGtzmqJc4UGHRt X-Gm-Gg: AfdE7cknamQYOSjgY0Wco86OtIXxrsqvgoY1ap3D+I5yKzQ1e24aS8rCTlkLLdZ8sIJ NeKeMuZJRo2eWhv/Y9hMAH7TdvLgxploJaVsn4DVjkWccu9XfpDg/XKnT6vOK6NExV0MCd8eUBz d5ZQ15guPFFdhQmbzx/USFvrc6UQQ+awKN/U3qHpW5hw0V38ymPMgqe2MyTBGsBvh0WVIF7jzku pUW5npRo3ulrHojG6sQ8v1ePxhrntKKQgI82e4rj9+cL2PLF7KGyQfluzaTUlvE605ro0GExNED 6Kx1pQTo+CKUFA5YFXzb/YF3wtXjks7y+XEMILRR5xH6wPGiMrLunlYW0NBgkeyvWua0 X-Received: by 2002:a05:600c:1c0d:b0:492:203f:a378 with SMTP id 5b1f17b1804b1-493e121b8cemr1125155e9.8.1783526610773; Wed, 08 Jul 2026 09:03:30 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260706081218.3438762-1-richardycc@google.com> In-Reply-To: From: "T.J. Mercier" Date: Wed, 8 Jul 2026 09:03:17 -0700 X-Gm-Features: AVVi8CeKwW_bIq12eer8jqRPGlfjRD0YcQhmUYS4ZpC1uymCZabPMvvX7Vk_-Do Message-ID: Subject: Re: [PATCH] mm: vmscan: abort proactive reclaim early when freezing To: Shakeel Butt Cc: Richard Chang , Andrew Morton , Kairui Song , Qi Zheng , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Johannes Weiner , David Hildenbrand , Michal Hocko , Lorenzo Stoakes , Suren Baghdasaryan , Martin Liu , Minchan Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 8, 2026 at 8:48=E2=80=AFAM Shakeel Butt wrote: > > On Wed, Jul 08, 2026 at 03:24:15PM +0800, Richard Chang wrote: > > On Wed, Jul 8, 2026 at 12:54=E2=80=AFPM Shakeel Butt wrote: > > > > > > What's so special about proactive reclaim? Why the same situation can= not happen > > > for global or memcg reclaim? > > > > > > > The target batch size of the global/memcg reclaim is typically very > > small -- usually SWAP_CLUSTER_MAX (32 pages), allowing the task to > > yield or check signals between attempts. > > Furthermore, kswapd is a kernel thread designed to be freezable, it > > explicitly checks kthread_freezable_should_stop() in the main loop. > > In contrast, the target batch size in proactive reclaim is > > user-defined and can be extremely large. Without signal checks in the > > inner loops, the task may continue scanning and evicting pages for > > seconds at a time. > > Why can't the proactive reclaim use the same batch size as memcg and glob= al > reclaim? Because it is very slow: https://lore.kernel.org/all/20240202233855.1236422-1-tjmercier@google.com/