From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 83A9031E84E for ; Wed, 15 Jul 2026 22:00:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784152830; cv=none; b=uY26L/ZL0uhY1w2hT7EeV/C7Bx8i6YjSFx1dhfXiokYYYyILAy3nCwdK5xwBVXK2VlgPxo6VUqukAdArFp3MswHpCI/CTDCCEAysi+9wzgF6ZKwmmFZ6VGGRUNmi9lMPSeo3PfXAtbeSasgldFpSjt7HUf9iKeP0iDxLIBT+09w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784152830; c=relaxed/simple; bh=avTUH5hNV+3zOqNCvLjhV7nHs8whukUKlbCEy56f6AY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sW7YjVqa86N7gQpaZSLDCs//U3W/m2Ov0UeJGigslIRlOACq5xLp5MVkBVvCYYrOC0lj9rj8x+2qB7iea/mQ2xxa47IzYbIXXIhg0whAkuQhqmSmR+rWqRW1spwlmYhAzbmu9uCVeXOe5nlahPnMaQaEWJJELAbm7TXkAjtDVTw= 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=I2g36dOW; arc=none smtp.client-ip=91.218.175.182 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="I2g36dOW" Date: Wed, 15 Jul 2026 15:00:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784152825; 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: in-reply-to:in-reply-to:references:references; bh=0OlkplaR8GgK13ho8tmV45hljbLwqCV78az1wZPy6dI=; b=I2g36dOWHmLPrOUFZDp+GK1CJyMsEDtzLMDeQeyMYqsYAoPixeHzlU+0hVAtYrnS0ded3Z OBckUwSsmvwrAjQnYCTkQnLz9iTqMeWlwrbuv3yRaCGNGHtM4pRBoDH5E391/205TxacKw Fe/9FXCqvEh9ygk51xr89BL33yxsmuk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Johannes Weiner Cc: Andrew Morton , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Zi Yan , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] mm: fix reclaim storms in defrag_mode Message-ID: References: <20260626182215.1107966-1-hannes@cmpxchg.org> 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-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT On Thu, Jul 09, 2026 at 01:51:19PM -0400, Johannes Weiner wrote: > On Wed, Jul 01, 2026 at 05:31:11PM -0700, Shakeel Butt wrote: > > On Fri, Jun 26, 2026 at 02:21:16PM -0400, Johannes Weiner wrote: > > > As we deployed vm.defrag_mode=1 into Meta production, some workloads > > > regressed with recurring pressure spikes and swap storms (which in turn > > > triggered userspace OOM rules on pressure and swap utilization levels). > > > > > > Tracing pinned this to non-movable > > > > allocation? > > > > > requests spinning and reclaiming > > ^^^ > > non-movable requests :) I was just asking if you meant non-movable allocation requests. > > > > unproductively when kswapd/kcompactd are overwhelmed. Direct reclaim > > > predominantly frees up pages in movable blocks, but those requests > > > cannot use that space under defrag_mode rules; > > > > Do we have these rules documented somewhere? > > Kind of. The crux is that defrag_mode enforces ALLOC_NOFRAGMENT in the > slowpath as well (whereas vanilla just does it in the fastpath). So > it's documented to the extent that ALLOC_NOFRAGMENT is. Ack. > > > > and it is unlikely to > > > free up whole blocks incidentally for __rmqueue_claim() to work. > > > > > > This series fixes it by making non-movable requests participate in > > > pageblock production in the allocator slowpath. > > > > Sorry after reading above sentence I didn't get what those allocators will do > > things differently after the series (I still have to go through the series). > > Let me add: > > [...] - meaning, they will invoke direct reclaim and direct compaction > with pageblock_order. > > Does that clarify it a bit? Yes, this is more clear.