From patchwork Tue Sep 22 02:01:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rik van Riel X-Patchwork-Id: 11791335 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C9D559D for ; Tue, 22 Sep 2020 02:02:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0FFEF23A7A for ; Tue, 22 Sep 2020 02:02:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FFEF23A7A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 15CB7900018; Mon, 21 Sep 2020 22:02:04 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0E661900012; Mon, 21 Sep 2020 22:02:04 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F16CD900018; Mon, 21 Sep 2020 22:02:03 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id CCA6B900012 for ; Mon, 21 Sep 2020 22:02:03 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 87D46181AEF09 for ; Tue, 22 Sep 2020 02:02:03 +0000 (UTC) X-FDA: 77289046926.26.basin49_44001b42714a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 65E381804B661 for ; Tue, 22 Sep 2020 02:02:03 +0000 (UTC) X-Spam-Summary: 1,0,0,7aa7211d4162dc48,d41d8cd98f00b204,riel@shelob.surriel.com,,RULES_HIT:41:355:379:541:988:989:1260:1311:1314:1345:1437:1515:1534:1537:1566:1711:1714:1730:1747:1777:1792:2393:2559:2562:2693:3138:3139:3140:3141:3142:3865:3866:3867:3868:3870:3874:4250:5007:6261:8660:10004:11658:11914:12297:12517:12519:13069:13148:13230:13311:13357:13848:13894:14384:14394:14721:21080:21627:21939:30054,0,RBL:96.67.55.147:@shelob.surriel.com:.lbl8.mailshell.net-64.201.201.201 62.14.0.100;04y8ifffkpy75erzuzcted89fwb9nypdkn1i4qas4tpixy7bc391adyzpz7pfpw.yksyuuruqhagk7tbqr4wc36hxad3xdqi6y7w97m53ethazfzrnurxszbw3ipi8a.q-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: basin49_44001b42714a X-Filterd-Recvd-Size: 1350 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Tue, 22 Sep 2020 02:02:02 +0000 (UTC) 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 1kKXcv-0003Cm-C8; Mon, 21 Sep 2020 22:01:53 -0400 From: Rik van Riel To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, kernel-team@fb.com, niketa@fb.com, akpm@linux-foundation.org, sjenning@redhat.com, ddstreet@ieee.org, konrad.wilk@oracle.com, hannes@cmpxchg.org Subject: [PATCH 0/2] mm,swap: skip swap readahead for instant IO (like zswap) Date: Mon, 21 Sep 2020 22:01:46 -0400 Message-Id: <20200922020148.3261797-1-riel@surriel.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 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: Both with frontswap/zswap, and with some extremely fast IO devices, swap IO will be done before the "asynchronous" swap_readpage() call has returned. In that case, doing swap readahead only wastes memory, increases latency, and increases the chances of needing to evict something more useful from memory. In that case, just skip swap readahead.