Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp177146imm; Thu, 12 Jul 2018 16:47:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdlU/2JKJZ6XzIWszTDH+JQX+ucpS21tC3t92Kpgaj7cQNQeu9FVQFPdxCkKJUwciJBoyJm X-Received: by 2002:a62:d75b:: with SMTP id v27-v6mr4445082pfl.79.1531439229336; Thu, 12 Jul 2018 16:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531439229; cv=none; d=google.com; s=arc-20160816; b=ttUCM6y9rxQ0UQ19j//2odlb/NZ1LTPm5ks58RVPnWoDf3wjfD6Q5pAzJ/JV12lp36 oKw8w2C1vi0EeOVStQkkidVzoyc1D41OcXGAsF8ahKGvjS2Y7OJNpCHEbsSrxtdt3ZDb /4gsivs/mg3qZoyyTBgWQ4VXpCUr64V5GJnIx3jewbOwFtTnM0Ez/SaR7QX9fDHL5IGh hH2z+ia9FMwwXHvw8bpgWMvv+qqIjZmrVJl0nQiDgwl17YKDXCs4XFuwgSe+yB7zpERu c1ySRuKpfA0fyTJW8NHX2PgMM2RU8lGyafBkds/Du0O6sKTKACpyEITSuhZFq4TVlMLy JZ9w== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=pwPwpMMeuYLuuEJJLS37ccIVZA+6d9H5VEi2vCq7E0k=; b=YNe22WgqXg/bHN9Axl9+23NwoKX0eES7NRbqaSH4DFMsJM8vcVle2ML40Axr1tX/GR kUv68E/IEgUJFF/+dT4sR/rEHWrxK3iYOKmHk4oextHDJxt3xLB8FZPz2HSmzu+NTwkC z3hU4H3XDkkOUKZfl5cB9VWzvpPYwdvZ5PAtIl4P7DrwEgRppOKPb2sTuMk6TW/XaelU BwZIDUwliQyKoKsj6diLS3jsFMhp0ExB6dncnWKxjJHVwzxtdAeB+XlKQlzksKlroNtX /RME9p34gP6JitQ8xIzI79G9TnuRWXwg5Frlz3wdGrnq8klc/ujC9cyFBF7+pV1WZODM uIkw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3-v6si22345876pld.189.2018.07.12.16.46.54; Thu, 12 Jul 2018 16:47:09 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387711AbeGLX5b (ORCPT + 99 others); Thu, 12 Jul 2018 19:57:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55338 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387612AbeGLX5b (ORCPT ); Thu, 12 Jul 2018 19:57:31 -0400 Received: from localhost.localdomain (c-24-4-125-7.hsd1.ca.comcast.net [24.4.125.7]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A0380DA7; Thu, 12 Jul 2018 23:45:38 +0000 (UTC) Date: Thu, 12 Jul 2018 16:45:37 -0700 From: Andrew Morton To: Johannes Weiner Cc: Ingo Molnar , Peter Zijlstra , Linus Torvalds , Tejun Heo , Suren Baghdasaryan , Vinayak Menon , Christopher Lameter , Mike Galbraith , Shakeel Butt , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [RFC PATCH 10/10] psi: aggregate ongoing stall events when somebody reads pressure Message-Id: <20180712164537.324caee21fd68c47a02af009@linux-foundation.org> In-Reply-To: <20180712172942.10094-11-hannes@cmpxchg.org> References: <20180712172942.10094-1-hannes@cmpxchg.org> <20180712172942.10094-11-hannes@cmpxchg.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Jul 2018 13:29:42 -0400 Johannes Weiner wrote: > Right now, psi reports pressure and stall times of already concluded > stall events. For most use cases this is current enough, but certain > highly latency-sensitive applications, like the Android OOM killer, > might want to know about and react to stall states before they have > even concluded (e.g. a prolonged reclaim cycle). > > This patches the procfs/cgroupfs interface such that when the pressure > metrics are read, the current per-cpu states, if any, are taken into > account as well. > > Any ongoing states are concluded, their time snapshotted, and then > restarted. This requires holding the rq lock to avoid corruption. It > could use some form of rq lock ratelimiting or avoidance. > > Requested-by: Suren Baghdasaryan > Not-yet-signed-off-by: Johannes Weiner What-does-that-mean:?