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 4F128C4332F for ; Thu, 24 Nov 2022 01:29:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B18526B0074; Wed, 23 Nov 2022 20:29:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AC7CE6B0075; Wed, 23 Nov 2022 20:29:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B6736B0078; Wed, 23 Nov 2022 20:29:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 8BB116B0074 for ; Wed, 23 Nov 2022 20:29:39 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 526F81C6B9D for ; Thu, 24 Nov 2022 01:29:39 +0000 (UTC) X-FDA: 80166603678.24.440CB64 Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com [209.85.222.50]) by imf08.hostedemail.com (Postfix) with ESMTP id EF6F116000F for ; Thu, 24 Nov 2022 01:29:38 +0000 (UTC) Received: by mail-ua1-f50.google.com with SMTP id e26so127154uaa.7 for ; Wed, 23 Nov 2022 17:29:38 -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=1fnmRHuC0+yQgv2N5cDHL0+8S+SApOU5affk2tW+8RI=; b=Kg9dxVbpFy1QGNmYu5mluAC8FbOjsrd3VGHz1Xw1eB5JmUlXd6/vUX/f7Qs1GsceQe qiq3HKOvJZI8CDuBNcKBINx39Al3fBX1zpv9msgyA3teFqVsAFQxOTTcTqg4uqLbvxZ0 32UGeSBr60jeh2LOtbBGYzq3JagtcNWKe/sjGoknfXZSKKMLgCzLiVv/aJbuXUcFn8lj iqNEq5UM7Aeq7rIkXiEQfuEvM9nI+3PLMOSSu0jAIYd73ZJZ+uQlQy22barLFPkaxvNS Ub33Y1CcHtEvh2PWQ+78FLe/QueLpwlNUklpmhKyMYSNAaUkTJhVQ5iP+Caew6oIihbo gMmQ== 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=1fnmRHuC0+yQgv2N5cDHL0+8S+SApOU5affk2tW+8RI=; b=kZGnSESiioXaTJS2WmWaZxfyIoYXeUB5jw7R+AkLChQOtdveVu5s268qVyX1jrwLVb dfLL2uTy0b44xkQxe7QTGRH4n2sRRhMjV6X8EqljHWP0GwrWZspoekg3+vCNUAKLvttX 6ZI+2ywKZqgDtjbXK4efXqrpuk1YfpBSGFAvcK6sjF/B+vjBkvdB9UdR6Y3jtyZHWmk6 Fo+eHpZ9smq/asPvUKI4gUd6v539nnzhmh+RbUjlVO+HtXiUkuyTSjAnQ8/Yi+Du5uke L5ac/v5Fgrd4f84YlwkUl+x+JzmU3fCQbmOga709a92Ikb5z7+KSoVtGtEbxx3UEQPYn KBLQ== X-Gm-Message-State: ANoB5pnvIPLrxt+x3FmwY6wxdfJlDWPQ/LInPZlgLKCzMv6q3nDkerzl sYqKV+PnMulyLquYMuf/Hnsd725d420ETkon9zMDpQ== X-Google-Smtp-Source: AA0mqf4YdkPozX0Ai70KLZv8nCs+F+fZCqYyMHVZrt0bBz/TsRmFvBBM+SHNy1dHA7JF/0jdKS/UF6W1+RhsH4JTkQ8= X-Received: by 2002:ab0:77c1:0:b0:418:620e:6794 with SMTP id y1-20020ab077c1000000b00418620e6794mr17490339uar.59.1669253378097; Wed, 23 Nov 2022 17:29:38 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Yu Zhao Date: Wed, 23 Nov 2022 18:29:01 -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; imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Kg9dxVbp; spf=pass (imf08.hostedemail.com: domain of yuzhao@google.com designates 209.85.222.50 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=1669253379; a=rsa-sha256; cv=none; b=t+HLH4Ua8csO2Mn4nWu4Sl1T2q2EJztEBxXY+RHEorqdL+xl6J+rXk0eMpu9jMBsWBAC6m PQqge3sooIKdwgMTGqgrfZ3+7z1sH7xL6+38EAlrVgXfoFe6jBLSXzY4j2KawFwMPQdAek qB3jWNIS239qicuTJvmjga02tYRwBIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669253379; 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=1fnmRHuC0+yQgv2N5cDHL0+8S+SApOU5affk2tW+8RI=; b=hXI4Kvib+/7WEoP/tlwm8h4x7HPaqTH/vg+uVCaOc/5/zqKqTaMtOBQXJcwfW28J50xYHI wTEF5A/C8poMeGRr2XH9IweeHpw7hFtzd3k36rZvOTAR4QAQM63/qIjgiQSS148TAiWrl7 tphwARhNqgI7mDCzyuMhXz5LwFJV4Ao= X-Stat-Signature: h49f3z4ydryw4xurr1m786ewkpw5teqi X-Rspamd-Server: rspam08 X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Kg9dxVbp; spf=pass (imf08.hostedemail.com: domain of yuzhao@google.com designates 209.85.222.50 as permitted sender) smtp.mailfrom=yuzhao@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Queue-Id: EF6F116000F X-HE-Tag: 1669253378-795993 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 6:18 PM Yu Zhao wrote: > > 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 This is the baseline kernel, not MGLRU. > $ 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