Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2089256pxu; Fri, 9 Oct 2020 07:42:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7NcD2gkM9AI3i5NCKBkv/BjtU7ifs3WTsKRa+SLeTzt5XzXcy+sn3wM3ZEB2ZFcvI6EDS X-Received: by 2002:a17:906:c045:: with SMTP id bm5mr13969853ejb.311.1602254529211; Fri, 09 Oct 2020 07:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602254529; cv=none; d=google.com; s=arc-20160816; b=xgtkl2y0uyv5vmfa49PuCgHt7LWkQfHYF4qFFHN3qlvFNMfBUQhml8uy6IrEY7/mgy WRDmB5FJv4rKVbSTNszDsmFHZwdznLSqZxV3dNgmLzEdRoA50tEgdceeYywjwn8/ClpA y31AJOtFTUvEJaxdevs3Rl6ley235hwZBLPV+MP1dYsWcM8ugyk3eU965P1idRhO3HIm wD6YDXnWrdnKlu9S1nPKe2J7VdKlOeoFKf3/iLWRID+D1IiBB+8PbzKxYGNmERdKAVB+ BCf0OGbDI/e6Q6DGnRNf2g4BokUYH7OA6NM3mfr5ENY+Q1ABYSNczY9R2Kf7qOhI7Hmw 35ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=Ur3KTvMWhoQMlICBHA/m2sioogs28bLh0kI5vLowg14=; b=Neg6Bi+zu1DCIfInKF5PEorNZVwjcZPBTbmb8BhNIquHHs+Rpw4ZmkbX0KF5lvAVRo tEIsm9KxfPX5BLfR9pcCiag0m7RjrLmx/KON7Mj9+axAZ7V8cew3xxg18mWb1SNVF5a1 OJInvPGioLVQZv+AqtsXnw31CXY58lf2lk30RhmPgPF+k/L7fAS5KO2LHqbTiJ29BO9H /fcaFpBfjZ9qN/spdA2uwnUVCMajB6XwGkOQmUcclyGtye2HbPjfjPiIwf05m/uMjMa7 UnShgitdbPChaOkNQIsfy7RMsn5/FDh4vH+36zMYhHXvz+6ZCGRzPsLkKq+Vggpvq+ff ccXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si6149101ejj.664.2020.10.09.07.41.46; Fri, 09 Oct 2020 07:42:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389116AbgJIOir (ORCPT + 99 others); Fri, 9 Oct 2020 10:38:47 -0400 Received: from shelob.surriel.com ([96.67.55.147]:39214 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387978AbgJIOic (ORCPT ); Fri, 9 Oct 2020 10:38:32 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kQtXK-00076v-Lf; Fri, 09 Oct 2020 10:38:22 -0400 Message-ID: <82a7690e181cf1995e733120dad828e628cb80d9.camel@surriel.com> Subject: Re: [PATCH 0/2] mm,swap: skip swap readahead for instant IO (like zswap) From: Rik van Riel To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com, niketa@fb.com, sjenning@redhat.com, ddstreet@ieee.org, konrad.wilk@oracle.com, hannes@cmpxchg.org Date: Fri, 09 Oct 2020 10:38:22 -0400 In-Reply-To: <8b68bf5f6b041a75a62a1908214279a45722dda6.camel@surriel.com> References: <20200922020148.3261797-1-riel@surriel.com> <20200922101250.527d9e676fefbb4c8d0cd5b9@linux-foundation.org> <8b68bf5f6b041a75a62a1908214279a45722dda6.camel@surriel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-k60RIuQHusUl9KWWws/D" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-k60RIuQHusUl9KWWws/D Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2020-10-05 at 13:32 -0400, Rik van Riel wrote: > On Tue, 2020-09-22 at 10:12 -0700, Andrew Morton wrote: > > On Mon, 21 Sep 2020 22:01:46 -0400 Rik van Riel > > wrote: > > Any quantitative testing results? >=20 > I have test results with a real workload now. >=20 > Without this patch, enabling zswap results in about an=20 > 8% increase in p99 request latency. With these patches, > the latency penalty for enabling zswap is under 1%. Never mind that. On larger tests the effect seems to disappear, probably because the logic in __swapin_nr_pages() already reduces the number of pages read ahead to 2 on workloads with lots of random access. That reduces the latency effects observed. Now we might still see some memory waste due to decompressing pages we don't need, but I have not seen any real effects from that yet, either. I think it may be time to focus on a larger memory waste with zswap: leaving the compressed copy of memory around when we decompress the memory at swapin time. More aggressively freeing the compressed memory will probably buy us more than reducing readahead. --=20 All Rights Reversed. --=-k60RIuQHusUl9KWWws/D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl+Add4ACgkQznnekoTE 3oMWOwf/Y2Os9TF60rmXZz3GfPj0PJEwiaZahgqw980IbInRx2YG3rrcnYvLUW9h 54bhIK65h/q94iDktf1y4XHEW8vkHDQalV5794DMw7ensXC97swrHaQ8s66nQgnQ TNlffRJghZgQa7ERNQ1pzDrDIlSUGqgu1a2OT0EJIlBvD5qlxEIB1k363HHpc906 md9AzXF+Rigj9AV9+6BCtb/ROGj7bbT8OMuRD19MbHBSF2SkaR9rjawkkdYMHWdd kRBlO2GYJDrO1wxBBBeqSYgI+TcH1o3vhDG1Cb3PPV4GB/BuLgORf8N8Bx1380pd 7U0KZ2FnGOYrBWeb3ufFUyIWc33/6w== =5PNd -----END PGP SIGNATURE----- --=-k60RIuQHusUl9KWWws/D--