From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 BDBAA42B32C for ; Mon, 27 Jul 2026 16:50:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785171023; cv=none; b=hK3mlXZuOoUVh7mmZGU/T+YdyjYXNdV8giRXC+f/laJKrxMbpzajJMWObVRG4BuM39zKqqyn+DnC/PxomJt3iuB3wMew66bgtn5rU484CsjA4EqEMF111Ozjc+RBDVTJzDGVNCQL5AhMFFRWkcfWiXSN2SpcPLEd8O2QFRAXvB4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785171023; c=relaxed/simple; bh=5mQRN6h7tTCFnsXFddM0Ko1zLoseWwOecIpZi53zeOc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kvHMHpygfA5ZEQV4YHoRowSKXovMvzA0xXX8Kx+z24PDIcilxCW24AJU+f8Ow7AXt7qOyq+cz3j6YbxP6IxR9dI27D3Gtpnd9kwgdsow7632O81q56NG6vQ/zxPQWQcXZHyUeve5LkZFDKEswA8gByQByhkfmyPZYOzvCwQiJAM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b=lNYRGiQ7; arc=none smtp.client-ip=209.85.222.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="lNYRGiQ7" Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-92e5b048375so168047085a.1 for ; Mon, 27 Jul 2026 09:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1785171019; x=1785775819; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=TyxgjtQoCDEFZf0QPk0ARVlu8b9GSZjprhFXfcluj1o=; b=lNYRGiQ7/6kmXd2ooGskBxw5HlySPgfWOmd30CJ91vs2RsCs8jXML7QMkkm4pdOsOT +hQUdBMwldz2HPRYGpysVcm0VA7em7ZpP32dmByNpxxJMZsDqxCXxx2JCd33q26IGeTU 7s+5RP3hnchkKrfP7Nc7GfJTjyHY9mALbQWoGOJKTRleI7mL+IMQMwFAJZRFQAGK7C+s 0nuHhdB1oZP3CX0mmQr50/xb+woRQfNhQE5+UxC8mkJcb30suuvvNuIhECcjBLhvo8mW ZfvyX/v34IJBCL75WRgbgS0Lmili+0bUnSDyMaeKS1Y44WK/rhT+JTPnd+ZqcrZZKfBe KTdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785171019; x=1785775819; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=TyxgjtQoCDEFZf0QPk0ARVlu8b9GSZjprhFXfcluj1o=; b=pa3iB46/v2cZuAKHu7qIDj2cKQbuqX86fjj4oXCF38vBgZhJbjediEMO1TGJN58hBD ahbu9GuP5flvIVSfojX8fP4MHNvMFkGkWl2TzPlrhfxi5HwIQEzMn9KOON54bnQNB7Cm FzQR1sbaVcDACFQq5YcjOA2bC67MJ+0V3oynMDj/j0FDjMDTfCnOIuYHG4wXFqmn0HES ZBji3Cs4Weip27/xe+i2AaNHlowAdczCq7gUugDZRFeJmdB2L1FGo4roHc5UK77xytrm Bgv0I+oAahy0kIzp/lPd3DANB8k6PvKUOQewwa+QhAC5P25+3qXXSwxxxhxZipdLHCAZ HEaA== X-Forwarded-Encrypted: i=1; AHgh+RpWX6D6BrWzF3vWwKVwnzY6G/LyaHxxHM40DiEaVwfpO/5Jr4rdM0e7GeabBajFscn76XRJmjQHDVjPq44=@vger.kernel.org X-Gm-Message-State: AOJu0YwqkGCln9EtJAPj1PjEVfB9bIlrq9+8io4ABQt8WixcDJj7gEiV 7cRVsz07DUCN9VSfpnckHjBnZ0wN8ZAAULE/uqiA/hmc3IQwlSZjWBXTq0qhfa0YH7w= X-Gm-Gg: AR+sD11Xa4GydjQRBe31x/IRbdPumMcPEE8dXUzoEJrnTYJqeKh9tinq8DBf7mONVnj UVWP2luXNdeMGQzruEkVzfZN22cL2DStAGKqoC7LaBdoc53sPnVF5BSus8oXmkpkFx6Tk8CJgTd goDs5JVpitRKtLSfNtSHLmTC8aEaQegHN+tMmLKwqRa17Dg3AmIiNhEDm9gX3dJZC3uRq7NzVKA Rdc1bf3lvhLFqHU0Hqhw9iMUOvtQ9oaSBM94V508HeApyZauTw423EOyh7Qsk5Gu2stGjRv+8ZF LjhNHiVDexaoFZlmaXjhe7jimorjZ4ui6X0W3KBZ+esSsShsOFRXWarkl70aMeRSqvP6E5nPNYH SbtHvfMB/sHSGtPSMHtWBTh1j3MSdFzRmg6CGRWNqUxP1pfwt+lvf3MnqbaQtCmKxB1Uw+jRtwt uu X-Received: by 2002:a05:620a:2983:b0:92e:a48d:251e with SMTP id af79cd13be357-932fe2b5b4emr1445285a.24.1785171019290; Mon, 27 Jul 2026 09:50:19 -0700 (PDT) Received: from localhost ([2603:7001:f100:500:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id af79cd13be357-932de5150dfsm649312085a.3.2026.07.27.09.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2026 09:50:18 -0700 (PDT) Date: Mon, 27 Jul 2026 12:50:17 -0400 From: Johannes Weiner To: Brendan Jackman Cc: Andrew Morton , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Zi Yan , David Hildenbrand , Lorenzo Stoakes , "Liam R . Howlett" , Mike Rapoport , Shakeel Butt , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 4/4] mm: page_alloc: fix non-movable reclaim storm in defrag_mode Message-ID: References: <20260722150006.3848560-1-hannes@cmpxchg.org> <20260722150006.3848560-5-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: On Sat, Jul 25, 2026 at 12:34:29PM +0000, Brendan Jackman wrote: > On Wed Jul 22, 2026 at 2:56 PM UTC, Johannes Weiner wrote: > > @@ -4169,8 +4185,8 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, > > barrier(); > > WRITE_ONCE(current->capture_control, &capc); > > > > - *compact_result = try_to_compact_pages(gfp_mask, order, alloc_flags, ac, > > - prio, &capc); > > + *compact_result = try_to_compact_pages(gfp_mask, compact_order, > > + alloc_flags, ac, prio, &capc); > > > > Nit: the comment for try_to_compact_pages() is falsified by this, > we need something like: Yes, good catch. Thanks. Andrew, would you mind folding this difflet in place? > diff --git i/mm/compaction.c w/mm/compaction.c > index 0568623d9384d..ca57403dc1522 100644 > --- i/mm/compaction.c > +++ w/mm/compaction.c > @@ -2823,7 +2823,7 @@ static enum compact_result compact_zone_order(struct zone *zone, int order, > /** > * try_to_compact_pages - Direct compact to satisfy a high-order allocation > * @gfp_mask: The GFP mask of the current allocation > - * @order: The order of the current allocation > + * @order: The order to try and make available > * @alloc_flags: The allocation flags of the current allocation > * @ac: The context of current allocation > * @prio: Determines how hard direct compaction should try to succeed