From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (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 378DA30D406 for ; Wed, 8 Jul 2026 15:48:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783525690; cv=none; b=Uwsw6octsqn2i1xgPfpafYGjMwI0u8tPEFdZgBa1FZiaUmy28bUztDfxR/IT1/CPjtlENnGv03tlb2XRRv1L5JOMn4Qn4YDOmKBVERdOS5wNRi8xTT7DENvRGwZ5Izt3cHWcubY0JZh2HHxk64xdJNInTDXx0C5To2P2LhGN43U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783525690; c=relaxed/simple; bh=npeebnMldXh0pqTRADEubEUEUZy5k0I8rxzvKLvhUdw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JEqZV0FtE9zqg4tiKr3WNqDwO1JwyJhxldi7h75DOlF4YKTQzT9o7+JlkkjXXNIHoYoKYalWJVP5T/j5ucmzc2jtN0sVwN2mAPMsr7ekwJlzwn3PkMT9Zdm2vp7lGbD884L0jLwYicu1Tqg5zLJaZuDmwd6XY1ieLEfokqPkfk4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=k7v+LaJv; arc=none smtp.client-ip=95.215.58.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="k7v+LaJv" Date: Wed, 8 Jul 2026 08:47:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783525686; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fhXQ2pg2GCTHGE+3nF80C0E7btiY3aOHNwr8NyhJ9xQ=; b=k7v+LaJv9n79b2IMORUT3+mrLRRBz5m2NFw74Gefjjtg4tPW20M0W72UqCSGofT3tzCFKG f6hKIvgGXCdUT8CO62rcUzmK29BOSYlZQGPzqW76qhRoHBvypCEdxLiN50S3hT1fGnAIkL r+c7JeHJtZlbcCo15ERsJKNlTdxhHv4= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Richard Chang Cc: Andrew Morton , Kairui Song , Qi Zheng , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Johannes Weiner , David Hildenbrand , Michal Hocko , Lorenzo Stoakes , Suren Baghdasaryan , "T . J . Mercier" , Martin Liu , Minchan Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: vmscan: abort proactive reclaim early when freezing Message-ID: References: <20260706081218.3438762-1-richardycc@google.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT On Wed, Jul 08, 2026 at 03:24:15PM +0800, Richard Chang wrote: > On Wed, Jul 8, 2026 at 12:54 PM 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 global reclaim?