Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1274397imm; Fri, 13 Jul 2018 15:16:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfbKdyecoYpDq8eiA6IkaH7nie5UIfqrXoXNgYRoUCNUv5iwdDB1Hz6WyCYOa8d+4pQgVTq X-Received: by 2002:a63:6188:: with SMTP id v130-v6mr7636981pgb.100.1531520164380; Fri, 13 Jul 2018 15:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531520164; cv=none; d=google.com; s=arc-20160816; b=NO2O/mjgJ4KDN38QmS672/zK7/lAInMWBCLzmQnrsmP2sDvpiMMS9kqJs6WJ0JEcAe IBgP9XzO3krAmfMqXRvYQUQZX+raSXY/mfx3F596rUxr6+dPFoiF1YR2y7UfXbCDhlZ+ 03hRqArajMZIKTyvH3u7otOsQtdAuoiCBySY9+85xLmV0Ol61iupCDxPzW/BeBrZcMcj 2ckL7tIDQ885LW1bt6MQUuXVFAs37crzi09EhKE+tY7E8Q60BCfj45ovSFie5noFmeLa l//A0tQEAHFzH3dtLEjkbV/pO5cajKELjy0xSQwaP6/D/OrLyERg44nyb+1B/ZWhxNUC Bkeg== 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:dkim-signature:arc-authentication-results; bh=HgM7KHro5Gn8WNFQAxB6p2phFCYiHpaJFw0eoGoMk8o=; b=k7AQJloBiN144CJxrh/XviRb9ayEUKYg51y2xy0ldE3t8KwsR5suJbQSRTKQetbPA2 ZOuu2Nh0DO1825m9dPBlvGJfUTEmCSbLv/kzhjn68aBfsbbC3Teg1MGSaiWNVTJ00VWV aR8f6uTh8GIfs1A9huynHqOZDBnusfffN2E7J+kfCD08aw+KRDQChijfR6Wn3a5xnAoJ cb+x2/VQzeUus8VWcR7jMtbo/CBUak4gXNUjY8JkDks2lk4J+7oT3Xhhhnuu/cbBwAsQ XRVIJGLaJNF6GUYDrXDdsO5gG+69FmI8O2eJDwbMwcEkKb2aGax/+zP5IhuG3+sycebk 1liQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="clRff0t/"; 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=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o123-v6si23897402pgo.190.2018.07.13.15.15.49; Fri, 13 Jul 2018 15:16:04 -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; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="clRff0t/"; 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=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729787AbeGMWbs (ORCPT + 99 others); Fri, 13 Jul 2018 18:31:48 -0400 Received: from mail-yw0-f194.google.com ([209.85.161.194]:45834 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727188AbeGMWbs (ORCPT ); Fri, 13 Jul 2018 18:31:48 -0400 Received: by mail-yw0-f194.google.com with SMTP id 139-v6so12286668ywg.12 for ; Fri, 13 Jul 2018 15:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HgM7KHro5Gn8WNFQAxB6p2phFCYiHpaJFw0eoGoMk8o=; b=clRff0t/LKxP2MAaKBPTBh6Qov9zX5p9iR/gHqVHyfMmhtD2h1qWXdpw0+wLNLY8a1 gyeRVdlbeRgCMBW0JNzjxSLveVg4ZFYmX/Xy3qK443tfiRtUSLhKCJMhJhK6Y88culc2 82lWFICVR9lA99h2Jd++55g0BBv7bMAYw4+SLWlNkMlLUeFBOqf1ynNNEU+Ms9in6A3R YpHSJRlqXWceApOimo2I8040rZApFcY1Lyx9IyQhuiHMMqbZnS3NFBQ66WYCT5wrcCXn 2XfqXnPzZ4ENHl7nw44puDV/wNM5iVlTfZ020t7G/gyrwdI2b21o1UebTVdll5sJUxgN eFag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HgM7KHro5Gn8WNFQAxB6p2phFCYiHpaJFw0eoGoMk8o=; b=uFWYzu5RosdbbvzQdIcuwuMIQPJLXU4XlYjM5vBT8JZDoCMfK4CpgEeAspFc6aM6wQ Zi1qxdNEYyJLLUKRo6FSKnjo11bEa9bWsFP0s1svg5tp7T220qkkRsO8UpacdtfQ29tR 7C+KzaUTy9K3k860010Nc2lRUadK5r/mFAcMNFdlsv2jk3Sg90Qe0o/ke5BlqPTjw12F A5vY0RzQoKoadNVJerUYlm+ZS4TMiNmSmulN3Phdd/ljjeGLr+b5Mz9yQQZMdsvrlKaU 7I4etWAutop44rNyngbRyPMJF70ZjaIVDrs0AUEFs8Tzgt/EEDcwimGYVZ72kgGpaZdx 9X4w== X-Gm-Message-State: AOUpUlFfqrpg1OwaeWRxqI1O3k/B55uUpEABCrt4ffuFE2K8fzQ3rJ84 AG1DqoM6v6UPqUULYz+p4Kk2Fw== X-Received: by 2002:a81:2ac2:: with SMTP id q185-v6mr4290585ywq.190.1531520114498; Fri, 13 Jul 2018 15:15:14 -0700 (PDT) Received: from localhost ([2620:10d:c091:180::1:23bd]) by smtp.gmail.com with ESMTPSA id g188-v6sm2448033ywg.57.2018.07.13.15.15.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jul 2018 15:15:14 -0700 (PDT) Date: Fri, 13 Jul 2018 18:17:58 -0400 From: Johannes Weiner To: Andrew Morton 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: <20180713221758.GB30013@cmpxchg.org> References: <20180712172942.10094-1-hannes@cmpxchg.org> <20180712172942.10094-11-hannes@cmpxchg.org> <20180712164537.324caee21fd68c47a02af009@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180712164537.324caee21fd68c47a02af009@linux-foundation.org> 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 Thu, Jul 12, 2018 at 04:45:37PM -0700, Andrew Morton wrote: > 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:? I didn't think this patch was ready for upstream yet, hence the RFC and the lack of a proper sign-off. But Suren has been testing this and found it useful in his specific low-latency application, so I included it for completeness, for other testers to find, and for possible suggestions on how to improve it.