Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3465040imm; Tue, 17 Jul 2018 05:25:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf03i0xa2xPZamcvrobhftkILF6Z/ZYtmYuoPQCGouOCEr4lUgw8h5K6XsjkGsmwUksNfgx X-Received: by 2002:a63:2704:: with SMTP id n4-v6mr1364572pgn.87.1531830319985; Tue, 17 Jul 2018 05:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531830319; cv=none; d=google.com; s=arc-20160816; b=ueNxlhw90WrLBMKFPaZUYjbWaVUWYe6N4H8sabTrgIIx2ngdRiE7TspzIBcYU9BGeR pWj18+50Bu/YqxiYfK823KYMq93qQF6pO+c4NstGEc/K3r4n26XBEofZNAlXpWNcXuor 1DnnT9F/H7MQN1UPwQzig9BeQRDR3+Fwn2EgKecNqTID9y5CCDUiI35bhNz77NF3N7oe KXaaf3L9BJ53eGVo3FxIkDbBifnI+NB5B8iKPwnNkGPr1AWgNaMV6ag4YLCygemkCZB9 0aHeiFyO0zIZr5MX7yhyFKm3ddm0G1FNbni+uAwO1DWC9WTJiRjjvjt/bfGocjsYbmHh Wjzw== 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:arc-authentication-results; bh=exUwWSciyElGh+5melRCTQRb9I7wJXOpCvQ1icmgCnM=; b=rdl367LmU4cKqPFFjq4QMQafPFd7XWGcUnKtYOf5g2mh/bQBkqZ9vC/Vc5+fzJt5Zv 6Dp7uvUDI/QRYJfWepAC72yjJqmGNCJnuPrXAkUxMSHzjO0gMnzBT+zS/VrXjWIOJFf2 pNHJEZPg4VfL53UV0esCX4DcDsMfmmFsCw0RotErz7AAuJHHTjpmfoESRXISHriXtrkY q504y5OvP21U8LcB3psqEiUboEJIqeaFQWgYhRmgzkAX45pXbD4BOUVo35PwR9F5xqNJ +6tAoD4rUsKgXg8k9E7o6iBYMZ+VuQmYtu+nhnS9ZHiaZl2f0MoV7zLolwXU6Sjz2Xp5 GBVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4-v6si853938pgl.9.2018.07.17.05.25.04; Tue, 17 Jul 2018 05:25:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731542AbeGQMz6 (ORCPT + 99 others); Tue, 17 Jul 2018 08:55:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:50076 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731417AbeGQMz6 (ORCPT ); Tue, 17 Jul 2018 08:55:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A7801ACEF; Tue, 17 Jul 2018 12:23:31 +0000 (UTC) Date: Tue, 17 Jul 2018 14:23:27 +0200 From: Michal Hocko To: Daniel Drake Cc: hannes@cmpxchg.org, Linux Kernel , linux-mm@kvack.org, cgroups@vger.kernel.org, Linux Upstreaming Team , linux-block@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Andrew Morton , Tejun Heo , Balbir Singh , Mike Galbraith , Oliver Yang , Shakeel Butt , xxx xxx , Taras Kondratiuk , Daniel Walker , Vinayak Menon , Ruslan Ruslichenko , kernel-team@fb.com Subject: Re: [PATCH 0/10] psi: pressure stall information for CPU, memory, and IO v2 Message-ID: <20180717122327.GG7193@dhcp22.suse.cz> References: <20180712172942.10094-1-hannes@cmpxchg.org> <20180716155745.10368-1-drake@endlessm.com> <20180717112515.GE7193@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 17-07-18 07:13:52, Daniel Drake wrote: > On Tue, Jul 17, 2018 at 6:25 AM, Michal Hocko wrote: > > Yes this is really unfortunate. One thing that could help would be to > > consider a trashing level during the reclaim (get_scan_count) to simply > > forget about LRUs which are constantly refaulting pages back. We already > > have the infrastructure for that. We just need to plumb it in. > > Can you go into a bit more detail about that infrastructure and how we > might detect which pages are being constantly refaulted? I'm > interested in spending a few hours on this topic to see if I can come > up with anything. mm/workingset.c allows for tracking when an actual page got evicted. workingset_refault tells us whether a give filemap fault is a recent refault and activates the page if that is the case. So what you need is to note how many refaulted pages we have on the active LRU list. If that is a large part of the list and if the inactive list is really small then we know we are trashing. This all sounds much easier than it will eventually turn out to be of course but I didn't really get to play with this much. HTH even though it is not really thought through well. -- Michal Hocko SUSE Labs