From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (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 169B72940D for ; Fri, 3 Apr 2026 00:45:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775177107; cv=none; b=Q4rZXknLG5HjO4j+v2UNj4Ykw1CVP2176ig0nHc8i0cL/RfFv47u3K3KwJokjeO2vyHxQr7LSYUhnJFgeyLEz1XFLE3natOVGrG7cMoEH2zn7H5Kjr6LGnAc4LHq7N60HrVUwlCODay7I1zQhfiCWLxQdYXrWibCeaU5u/q83Ow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775177107; c=relaxed/simple; bh=Uo+eFa8ffM82vVc82HmTHe4hQtiePHyyfXhzDgRWbHM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=duVyP+st284GgV3D/xYk1mO/k4NZwww9Wphp+YmDdfrdYo5Nrx2IQrrfuEAkADPo56hKR3IzCzZWmaR0Jw9UDPIX//MirY5x3DYvC/NBRbCfjBF4WEtOR368sJsP4v/IXwL8HjzLk15fdxciU4EbeYaul2/+K9lWp1tUTPXtGtg= 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=pW8IIkcM; arc=none smtp.client-ip=209.85.219.50 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="pW8IIkcM" Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-8a0323830beso14616896d6.0 for ; Thu, 02 Apr 2026 17:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1775177103; x=1775781903; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=nc2bWeNZtLKm/ctbiyRLlxDwOQ1uLVCnFLmdvpOYX6E=; b=pW8IIkcMEebrPo4x2FLHdxCjZwPaW8CVQaBwRHSNo87N8QsO3f1eo5LM7d4BTxYDtp 3Rqf6/tD4MlxNxaFPwn/NCU8tzFnzP4v7MTNmKFjBQnQDU8NtqpoXAtSy8qVhdR2O8HZ yyfnbr7ysAwdUEQJ/vQcq1slRwtoqh6PtXCGv25B9HgxE0d2Ap4TL5JmGcHGxO4GgACc uWZytgwk3fxejkh+H7lFkynS6nROlXiQr9tO+9/ES52Aa8rpvzyZUK73w8iH8jAQ37NR 9U2ADHQ0ERuSejjXlffZ+ib8Zw6zHzNC3mNGYhYV+YpuwzUkpzsuXenSWOuKYeYj+zb6 8/vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775177103; x=1775781903; h=in-reply-to:content-disposition: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; bh=nc2bWeNZtLKm/ctbiyRLlxDwOQ1uLVCnFLmdvpOYX6E=; b=Ap/bOglwB3SByr+KZjngDftbrBJGcUeUkYqzeTpdVOhn10fqEiVtOtSyx6P5N5bS+r NIs5TYWZ3JKvEH3VTKNrEgJTzOfVRhWHCoVQ1m8/6N1E0vy7eQd4CTAwVO6VtCJvytkl lXLbBjLofdPgIENG61u+QbPmS84dJAUhs1XoxDyY11eiADU6xShHFDodeCqWxPWmfUho M9TFa/C1LiusTSU6d2UiCqJWZ7Up8gr76uMSxylt5AQ7xi98XAxJpbd9z5k4NGPucGxf zlABznsN20MqUl+rndyNvzdHM7a916Q9VUCEEk2PrpSkoZbq9pmsHla8r029LolWyz9A SrAQ== X-Forwarded-Encrypted: i=1; AJvYcCXwQps1TXnYyKvhuQbClZ4/t1432FNpdFxQnE/trYDgXZdOafJhLZhylbhmHFFS1AzXK+mxOb8k346m2KQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyadsB2MBjPY6swo9oJYicj72BZIBUlY5dZMUFiP7drXJU+sKYe hEagUzdRntaWXNhJ3JDFbr+7n4MsnMMiVIVLVXFyB2Pdn61NbOgLOtHBzLNpXhLo0/t3g8x874U xAzK/ X-Gm-Gg: AeBDieuMTd2gvxVETv7MfUkeSf6eUU1GfK6reS64EylrD+TGIXDy6IGPKCTmzz55TF/ NLrW5CLuu8ztN3D+JFtNTDbScjM2bM8yI+NsKDIBkitOVFkNMcvfZvKFaSBIMgDo3wc1jSvCWix m+BwfftnhQ+MrJ6fmGk9fMDDAwuO+mP3+/uyZz6Zu+WmE0T+iKUyuB8xXGCjV5B/2cqWO1v0+MW YEKj1SSThVpMbMsnqmiX0WApgwoNP+8Q9/QChAf8ORAIl1FEVCEWs9DgWDFlv63ejZ5TCiCaR/k U6pCXGDSk2zNux4HN+j3/VlZ7Z/AbQjSRFDpWDQDihm8+VV85Pps46P4YoMpocjr04z8Atyvj3K k+48EnEx3aNqDGmoCi4C5iYMhHNJX4P2jq6FKuRD1MYBUlN2mW9S7XpKnXFlSumVV1yNWdZs7+q SgHuLuKPFXJP/7da+3AEJvXQ== X-Received: by 2002:a05:6214:5f0d:b0:8a4:7977:e5fa with SMTP id 6a1803df08f44-8a702b96165mr25937426d6.25.1775177102854; Thu, 02 Apr 2026 17:45:02 -0700 (PDT) Received: from localhost ([2603:7000:c00:3a00:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8a596a0a655sm35304536d6.29.2026.04.02.17.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2026 17:45:02 -0700 (PDT) Date: Thu, 2 Apr 2026 20:45:01 -0400 From: Johannes Weiner To: "JP Kobryn (Meta)" Cc: linux-mm@kvack.org, willy@infradead.org, akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org, Liam.Howlett@oracle.com, vbabka@kernel.org, rppt@kernel.org, surenb@google.com, mhocko@suse.com, kasong@tencent.com, qi.zheng@linux.dev, shakeel.butt@linux.dev, baohua@kernel.org, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, riel@surriel.com, kuba@kernel.org, edumazet@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH v2] mm/vmpressure: skip socket pressure for costly order reclaim Message-ID: References: <20260402232511.17246-1-jp.kobryn@linux.dev> 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: <20260402232511.17246-1-jp.kobryn@linux.dev> nOn Thu, Apr 02, 2026 at 04:25:11PM -0700, JP Kobryn (Meta) wrote: > When kswapd reclaims at high order due to fragmentation, vmpressure() can > report poor reclaim efficiency even though the system has plenty of free > memory. This is because kswapd scans many pages but finds little to reclaim > - the pages are actively in use and don't need to be freed. The resulting > scan:reclaim ratio triggers socket pressure, throttling TCP throughput > unnecessarily. > > Net allocations do not exceed order 3 (PAGE_ALLOC_COSTLY_ORDER), so high > order reclaim difficulty should not trigger socket pressure. The kernel > already treats this order as the boundary where reclaim is no longer > expected to succeed and compaction may take over. > > Make vmpressure() order-aware through an additional parameter sourced from > scan_control at existing call sites. Socket pressure is now only asserted > when order <= PAGE_ALLOC_COSTLY_ORDER. > > Memcg reclaim is unaffected since try_to_free_mem_cgroup_pages() always > uses order 0, which passes the filter unconditionally. Similarly, > vmpressure_prio() now passes order 0 internally when calling vmpressure(), > ensuring critical pressure from low reclaim priority is not suppressed by > the order filter. > > Signed-off-by: JP Kobryn (Meta) Acked-by: Johannes Weiner