Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6457961pxb; Tue, 15 Feb 2022 02:55:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMbDgN13OJsZ0jkCDBF9XQL54ig6yP0qCU8ubMWmBZ1QlpH6WtPXsfzumOsOC9IlHbWiYv X-Received: by 2002:a50:d5d4:: with SMTP id g20mr3268673edj.181.1644922532487; Tue, 15 Feb 2022 02:55:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644922532; cv=none; d=google.com; s=arc-20160816; b=yBQTIRJ5bdgkmaab9zn3FXpwvTEM0LfjjkccfbEs/FGaVIsTvNsLmkbvn/9xuhxmEN drduHd7ty9Xe6wQxJJ3Y2541Zf0HkM5BB3NDpB9HiXbFwjXc/nLu5ez5OR1xHInQ1sh5 dmvE36y6xLs/J+G8BBjYJWRNPKmcehuyL+yVOiAt9Sg4FCktsfymFEmQRNMTJiWIJyn3 Bpr4SVr3gnSJF0gf0vlI4U5ZAep6EjimxN0ySnowPnmP8nmxg9zYofbKB2eZTjo+tdqH rDn29EvuYiTpMEnuXekRWmualWtTOXwjDSn7Uwf3/FsyKhDphYjG0dA/ZS5mz9Xsh2Rr GFlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=/Hbx3fObIWhgBujqDItSII0TJcFWw5tt0BEq4MXPHLo=; b=AxMQJ6CZGjZqLOhSDT34DnfGKYSYetz6YzI/12tFQq2Qv1TU/qXIRYwov1YlT+0/ZJ 1LsAjCz6Pc0QhDOGg0IdJVyPqkXr+/NImK9oGjbCh8BVfdHHj1A0es6Cs9obM2Kr/dpJ 9KZXNDTTvwZ8JF7f7TYy/o2XmHN+grdoth+8ZVtetREX8isxODi5enD14f93JxoHb5/m xGXwokRfYvGGn+n13YTbFDlTMPUS3KX1p5uUBKXR68N/0YTBPpWWciZpggQTfT/ITWXb RGfDNrlTlN2GfFCDKkZJ0KT+k27VTiQrSbOj/u5NKfbO9JtkbAaNCGvjUtH4VZj5Oj+x gYkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="TTulpw//"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js16si23339748ejc.676.2022.02.15.02.54.39; Tue, 15 Feb 2022 02:55:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="TTulpw//"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbiBNWsR (ORCPT + 99 others); Mon, 14 Feb 2022 17:48:17 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231644AbiBNWsQ (ORCPT ); Mon, 14 Feb 2022 17:48:16 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFF682E0BC for ; Mon, 14 Feb 2022 14:48:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6C8AC614DD for ; Mon, 14 Feb 2022 22:48:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8137DC340E9; Mon, 14 Feb 2022 22:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1644878886; bh=1UJ2OiyXpKMgePt9yHkVQT3f1I3liwRx9crIh4pbdh8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TTulpw//oeAq9LWoFuC5gP5jQL2rV71B/LvOaSfLDYi5+JcxWtSosJsWToeGzIZd6 YQY431PW1zqwb3wodRMXYkRQjnnxW3prhbhOn02wz4ZvstFcgEvnMSScLhYhA+0VzT gM6bugtF7m/BgrDrZ+3TXZxgJl/DswnHz+GuN4Y8= Date: Mon, 14 Feb 2022 14:48:05 -0800 From: Andrew Morton To: Johannes Weiner Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, CGEL , Minchan Kim , Joonsoo Kim , Yu Zhao Subject: Re: [PATCH] mm: page_io: fix psi memory pressure error on cold swapins Message-Id: <20220214144805.fa389f495fdfb07b40526f70@linux-foundation.org> In-Reply-To: <20220214214921.419687-1-hannes@cmpxchg.org> References: <20220214214921.419687-1-hannes@cmpxchg.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Feb 2022 16:49:21 -0500 Johannes Weiner wrote: > Once upon a time, all swapins counted toward memory pressure[1]. Then > Joonsoo introduced workingset detection for anonymous pages and we > gained the ability to distinguish hot from cold swapins[2][3]. But we > failed to update swap_readpage() accordingly, and now we account > partial memory pressure in the swapin path of cold memory. > > Not for all situations - which adds more inconsistency: paths using > the conventional submit_bio() and lock_page() route will not see much > pressure - unless storage itself is heavily congested and the bio > submissions stall. ZRAM and ZSWAP do most of the work directly from > swap_readpage() and will see all swapins reflected as pressure. > > Restore consistency by making all swapin stall accounting conditional > on the page actually being part of the workingset. Does this have any known runtime effects? If not, can we hazard a guess?