Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3615662pxk; Mon, 21 Sep 2020 20:08:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDzh86aq5O+ChHSO03nW+umps4XCfBNnIvchSPVbclfA0qB1rdQ2euxkGorcthpZlJgq3v X-Received: by 2002:aa7:cf93:: with SMTP id z19mr1926006edx.187.1600744118108; Mon, 21 Sep 2020 20:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600744118; cv=none; d=google.com; s=arc-20160816; b=TfnFo9lfKEz7M8HgA71hrhl/aOTMhzq59Na7mTxc/SVc0e7SIfdV4dC3DaFCp0rqZo 8kTiz+BE9325/glp/gqoNzfg9xS0X2uKBW5jX118WZPkUl01VT4O+wK+6nuqUX6qSY9+ aRVzXt3xM+l7indqe3TWHf8obdy7TS0RIZY+rvmNfJyg8sueQW1snHtA4cbJ4R5CMlQz nulUgx8uxjN5GeQhp5Lg/QEQo/pH620KLnKP966Kwh1ZnqIGPr57KwwzhnpO6u9ei/YZ XBMF9BoSQacqPHuwaqTo1nPDb/GH4r1xgL0Oho7F6/9qvkitwbOokCB9OPAhT50Z5AmI OaVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=r0gkyjqidTZOyD1KI9Q3HHpe6AjCKq1gtR3tSiRYtZ8=; b=mO6uU2ksgqNeacrnTuyB/keIt4WBf5P296pgu5S25c1wgnPKh4z1rYADf1ABkcwQ/q EvnIWOWl30DilpPBndrBHxUH4ZE8RB1xckgU1i6T6f+As2GSRiAoXOcVPEfP6N1dFRHn jz3FJGIM8Nom/PSEfN4YAoHtxN/wZoEjinn24CvmC5Vb2reqctHgS80b2vRneBvaJYcL tLqQof/PVkodWRS0jAS/HDo8S/2HSnYVv/tyeYsgsJ4ocLvLtmO8fQYngw4kaizYTQbE dlXg6xF431+KlfiGUjKMCuEfvt1onlZBMjsnuUA+ealKETOILpP7m7aBYGzN9jvl2nEM Qumw== 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 yc15si11994459ejb.23.2020.09.21.20.08.08; Mon, 21 Sep 2020 20:08:38 -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 S1729338AbgIVCCB (ORCPT + 99 others); Mon, 21 Sep 2020 22:02:01 -0400 Received: from shelob.surriel.com ([96.67.55.147]:45630 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729307AbgIVCCB (ORCPT ); Mon, 21 Sep 2020 22:02:01 -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 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 Content-Transfer-Encoding: 8bit Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.