Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp861860ybl; Fri, 9 Aug 2019 15:14:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7St0fM0A2QXn2ntZGnCMt7xRpVawmf1MRQDw4y4n3v4iDKv1VaKKxeIFBB23tl8yYovyl X-Received: by 2002:a17:90a:b28d:: with SMTP id c13mr6313828pjr.25.1565388888038; Fri, 09 Aug 2019 15:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565388888; cv=none; d=google.com; s=arc-20160816; b=vylNK2doEeZmRCSIi0qgUj+ApiR8JUD3G4K7NqKnzluRF6QO7tDjT/3nrLushz3KBt QIgJhwPmAYswymu1V0HlkYkS9ip8l2VzIqQJv4t7olGlyPjh4FWhlFaFhH2T+eT/EpJG G2raVEZSRU0Q6adai0WazEilEEM/BV32SQWhP98oqOVxvCQNyIH8hZqZMbNJgGHJtmrg Axy/YqBMwuKtWwUaqsJ3h62XeCtFnmvTwFXlPQkR1X4ZR7sZ+fD8oDlEbATNj081YP4D 7yPPbEcKIXaCdvAmkRPkzmaeXl0t/Wnwniwy+2FnPFZnfSqGJ5HtEOKmf3m2HrzKrZux kwZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xXAQi+C/0cFWu15a2YAoL7pawf7TDnZ80o+p3MerDFs=; b=HhRdzwIqjoRkD0mc3oMvpT6jvo05xNV3bMLTtEQ2vySLJ8s/I1E6TIpMItblGP2EzD ShzXiLiQN4U0r87SMTfvxRl8T0wSDcW20wHQ4oRqAu6TfKlK7vAzB8V9gZJYNugKjG5G 9fwUgvbSaPffp4JfYyPyO8Odey7Z+4kagmqzpB0Ag/k5MF0kPRfMsokOLLfD7ArdtcYb 42liD/zaCS9yL1tGWvHYWdJa2Skul7WK8J5d8EIQ/lOmrnLL/2Of5D/JZfJYP6QFonYX +SuT5TyO3Bn8TgtfkYW1gwNYBgKQZijgcobZoftW+va/2W1FbjS+K0hfffanba7qtWmC wWHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si49336561plp.118.2019.08.09.15.14.26; Fri, 09 Aug 2019 15:14:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726917AbfHIWOD (ORCPT + 99 others); Fri, 9 Aug 2019 18:14:03 -0400 Received: from mail105.syd.optusnet.com.au ([211.29.132.249]:38798 "EHLO mail105.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbfHIWOD (ORCPT ); Fri, 9 Aug 2019 18:14:03 -0400 Received: from dread.disaster.area (pa49-181-167-148.pa.nsw.optusnet.com.au [49.181.167.148]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 6AD0036420D; Sat, 10 Aug 2019 08:13:56 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92) (envelope-from ) id 1hwD7w-000108-Ua; Sat, 10 Aug 2019 08:12:48 +1000 Date: Sat, 10 Aug 2019 08:12:48 +1000 From: Dave Chinner To: Johannes Weiner Cc: Jens Axboe , Andrew Morton , linux-mm@kvack.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] block: annotate refault stalls from IO submission Message-ID: <20190809221248.GK7689@dread.disaster.area> References: <20190808190300.GA9067@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190808190300.GA9067@cmpxchg.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 a=gu9DDhuZhshYSb5Zs/lkOA==:117 a=gu9DDhuZhshYSb5Zs/lkOA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=FmdZ9Uzk2mMA:10 a=7-415B0cAAAA:8 a=tU5beferOtS2JaHV9NYA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Aug 08, 2019 at 03:03:00PM -0400, Johannes Weiner wrote: > psi tracks the time tasks wait for refaulting pages to become > uptodate, but it does not track the time spent submitting the IO. The > submission part can be significant if backing storage is contended or > when cgroup throttling (io.latency) is in effect - a lot of time is Or the wbt is throttling. > spent in submit_bio(). In that case, we underreport memory pressure. > > Annotate submit_bio() to account submission time as memory stall when > the bio is reading userspace workingset pages. PAtch looks fine to me, but it raises another question w.r.t. IO stalls and reclaim pressure feedback to the vm: how do we make use of the pressure stall infrastructure to track inode cache pressure and stalls? With the congestion_wait() and wait_iff_congested() being entire non-functional for block devices since 5.0, there is no IO load based feedback going into memory reclaim from shrinkers that might require IO to free objects before they can be reclaimed. This is directly analogous to page reclaim writing back dirty pages from the LRU, and as I understand it one of things the PSI is supposed to be tracking. Lots of workloads create inode cache pressure and often it can dominate the time spent in memory reclaim, so it would seem to me that having PSI only track/calculate pressure and stalls from LRU pages misses a fair chunk of the memory pressure and reclaim stalls that can be occurring. Any thoughts of how we might be able to integrate more of the system caches into the PSI infrastructure, Johannes? Cheers, Dave. -- Dave Chinner david@fromorbit.com