From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BB78C4332F for ; Thu, 24 Nov 2022 01:18:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 355246B0071; Wed, 23 Nov 2022 20:18:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 305886B0072; Wed, 23 Nov 2022 20:18:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CC806B0074; Wed, 23 Nov 2022 20:18:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 0D12F6B0071 for ; Wed, 23 Nov 2022 20:18:44 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E10DB140358 for ; Thu, 24 Nov 2022 01:18:43 +0000 (UTC) X-FDA: 80166576126.10.B4C848E Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) by imf28.hostedemail.com (Postfix) with ESMTP id 89D3EC000C for ; Thu, 24 Nov 2022 01:18:43 +0000 (UTC) Received: by mail-vs1-f53.google.com with SMTP id m4so230132vsc.6 for ; Wed, 23 Nov 2022 17:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7tBUw05aOdjyO9WsFCtTrKc5G8bk3/uCIv/FSXOVjTg=; b=cR5Tx2OzMDMnzLuq7r4ycWlRO2gzxpltG7WVxggQ3gkD+H3QiCLqshLPiuVxRJBFSU 0Dsod0ESCG9U1Y2Aqi9PF/Nv0lOtf83kNL85Mf0frsQ6U3JQ76FniUpqF2VAjwvca1/R WUvPfq1mJ0L6Y7QVHxD4+iO9ze85KXFCSaLauEtk3/gSVWHeaP7bEmE8bzDOwW68Pm/7 8kYPeF3UpkDZOn5PVa5upr+5tIqawN9l5Kge+KTEeHp8MWMmzNnu+YgckbCx/b91yURh sdLhWAYMIsjgOSUVC4+ufPavt+Btcq6W8cnHS2pv41s+tlftvvgZPEFPXzgj+qIQTbSC CdTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7tBUw05aOdjyO9WsFCtTrKc5G8bk3/uCIv/FSXOVjTg=; b=rQ0qSBvC3pBo/DdAcQzGUaiMelJFeil6az3ghQF6URo3usPAAawNG4/iHdnrZ85HGt 2XsTjdsJlh1zarnjx3JRGRFr68C2vUzJDPRNX8EVvWeNJIY3S5Gco1NvpCyNSZjw5ngp v8Yr4Vpk5cWpRC2SGI+s7MixXBZ0Wyvb2e0niX4FspI72IjHhVGjg80MYMU9ZD41rBms i1ZlwulhnyRvfJTnFgJUhcwe/uwff/DROHLpuwsXJfegtVXm3/dglMupZ9t2yJla4YTU U5KW96DgfAeDa3ytx4RBd0DxnapVBFtuDM/gpYPvOR1MFC+hZgzaU1GDjR+3zSVsdCxq lH+A== X-Gm-Message-State: ANoB5pn1rbnvu97NLhXucFs33Qkw0nKm7YsTgJeO6BvOI0RE+Py3q9/S t+I0qMKqXDoHpQEMXwXIbCtR4WUA1ZXegv1gDcOPMQ== X-Google-Smtp-Source: AA0mqf7tE/DJhqO/TmFy0k5UO6O+PUJ9K2GXNEe37t1kmvS+5u/3QWe/TPoislPxXNK6S3D8kkMtK+Q3OHAWXbFToEs= X-Received: by 2002:a67:c98e:0:b0:3ad:3d65:22b with SMTP id y14-20020a67c98e000000b003ad3d65022bmr7748848vsk.65.1669252722617; Wed, 23 Nov 2022 17:18:42 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Yu Zhao Date: Wed, 23 Nov 2022 18:18:06 -0700 Message-ID: Subject: Re: Low TCP throughput due to vmpressure with swap enabled To: Johannes Weiner , Ivan Babrou Cc: Linux MM , Linux Kernel Network Developers , linux-kernel , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , Eric Dumazet , "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Paolo Abeni , cgroups@vger.kernel.org, kernel-team Content-Type: text/plain; charset="UTF-8" ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=cR5Tx2Oz; spf=pass (imf28.hostedemail.com: domain of yuzhao@google.com designates 209.85.217.53 as permitted sender) smtp.mailfrom=yuzhao@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669252723; a=rsa-sha256; cv=none; b=4wt+I6mBpUkkWKVSNlQvSUGCCIT8iNIHhfjNj7vFMG9ouUsCfepWqiUJ4VqxN/22gZr9wb QFRGsNYruFRy7SuDBWltWoTULLUweK3w0rw3jnP5UyWXMlaW9CCGRrgYTux642Qm86qq1d vwRVucF3Af5xuAH6Mg7A4b/DL47XRNI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669252723; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7tBUw05aOdjyO9WsFCtTrKc5G8bk3/uCIv/FSXOVjTg=; b=dnEPvDN9MHbY2igvQwa8nkL5naxI+ElKsNtWJqtO1p7mcJZR9yDNdbKX6jsIdU7mj9iwFl YWdy8czbH5mQ9rauT3Dczr3OQAx2Ps4Foy6kHzRyxswx60sxfM+pUtxWoaRVLY4e3bIqrP R5tYe5K62Nqy4avCNSKV0rNzXZ5EhxM= X-Stat-Signature: yzwfy6fkc8ypgtir9ymmaa14qgr43wke X-Rspamd-Server: rspam08 X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=cR5Tx2Oz; spf=pass (imf28.hostedemail.com: domain of yuzhao@google.com designates 209.85.217.53 as permitted sender) smtp.mailfrom=yuzhao@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Queue-Id: 89D3EC000C X-HE-Tag: 1669252723-98768 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Nov 23, 2022 at 2:22 PM Johannes Weiner wrote: > > On Tue, Nov 22, 2022 at 05:44:44PM -0700, Yu Zhao wrote: > > Hi Johannes, > > > > Do you think it makes sense to have the below for both the baseline and > > MGLRU or it's some behavior change that the baseline doesn't want to > > risk? > > It looks good to me. Besides the new FMODE_NOREUSE, it's also a nice > cleanup on the rmap side! > > It would just be good to keep the comment from folio_referenced_one() and > move it to the vma_has_locality() check in invalid_folio_referenced_vma(). > > Otherwise, > > Acked-by: Johannes Weiner Thanks. I've added Ivan's test case to my collection. Interestingly, after this patch, the download speed increased while fio was running (my guess is that fio pushed more cold anon into swap): $ uname Linux test127 6.1.0-rc6-dirty #2 SMP PREEMPT_DYNAMIC Wed Nov 23 16:51:20 MST 2022 x86_64 x86_64 x86_64 GNU/Linux $ go version go version go1.18.1 linux/amd64 $ fio -v fio-3.28 $ curl --version curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.13 Release-Date: 2022-01-05 Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd fio NOT running: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 83.6M 0 --:--:-- 0:00:57 --:--:-- 87.0M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 82.8M 0 --:--:-- 0:00:57 --:--:-- 79.1M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 82.7M 0 --:--:-- 0:00:57 --:--:-- 89.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 87.4M 0 --:--:-- 0:00:54 --:--:-- 94.3M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 88.1M 0 --:--:-- 0:00:54 --:--:-- 94.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 82.6M 0 --:--:-- 0:00:57 --:--:-- 83.9M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 86.4M 0 --:--:-- 0:00:55 --:--:-- 90.1M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 82.8M 0 --:--:-- 0:00:57 --:--:-- 67.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 83.4M 0 --:--:-- 0:00:57 --:--:-- 78.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 84.0M 0 --:--:-- 0:00:56 --:--:-- 87.4M fio running: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 86.7M 0 --:--:-- 0:01:11 --:--:-- 88.7M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 87.7M 0 --:--:-- 0:00:54 --:--:-- 93.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 88.5M 0 --:--:-- 0:00:53 --:--:-- 95.1M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 91.6M 0 --:--:-- 0:00:52 --:--:-- 94.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 89.4M 0 --:--:-- 0:00:53 --:--:-- 86.6M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 88.6M 0 --:--:-- 0:00:53 --:--:-- 84.8M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 84.6M 0 --:--:-- 0:00:56 --:--:-- 87.5M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 86.9M 0 --:--:-- 0:00:54 --:--:-- 81.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 89.0M 0 --:--:-- 0:00:53 --:--:-- 86.4M % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4768M 0 4768M 0 0 91.1M 0 --:--:-- 0:00:52 --:--:-- 90.6M