Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1658169imm; Thu, 19 Jul 2018 05:50:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdQb/RAPu78NeRYXBSkLY8INmPU8MK8DqUwjJfGpbdNno8TVR1wqsREy7boWIJDwIbPwWWd X-Received: by 2002:a17:902:4381:: with SMTP id j1-v6mr10071080pld.104.1532004601809; Thu, 19 Jul 2018 05:50:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532004601; cv=none; d=google.com; s=arc-20160816; b=noDE8cQpnazxJYYnPL+qcjnQ7A/U6NYx62RX1IwHMYUBX0obSUm7gd+X7Pvcv14cye 0CsdGMpUAtB3Nj2+s8234hDonA/5SIdQcKGST23x8HrlAmo/fvB7X1jAHwuFZNVe/HKS SCmhlQQd80+8qWTIjVvV151wfjwokB54E0t0wwykkcdNwhnq8hSp7WVB/2chhGzZGfRj gtlAMeUBCDCDmy4K/HKOi+1YRQPayxCWPv1npXuD9MCYOk/LzAIuszQxSLBgxipa/V2l UkUP0MEZ6Y+F+C5njA9FX1V8hb8aV+FlZrwzxy5nZgLtO2G9u1B/53KpzPTTACAEtE32 rCgw== 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=9EV0y4Jq/QZWXMWnQmu4hP1A9LHDHt4yfnVQqzpTXvI=; b=ixrJo+8b7keDYX2p7Obu+5VfRvVs24gCB0FExKoxSDTxDL/6b5D7di8oorakbwgb1J MKUPvHtFYFtssuaY1yKe2OSXXWPmy+/dbGi3t/1pLYEU+ntTnP5sgdEX9klHvcAA04E5 pemHpOWZqYoKNrRl2/UUPig5msMu94KHyF+8TgLkMZbdsmh8860J+h/I4y8N4G12OzTd SXVNc9vSaaeJALt6pxC8fY7S035ryyg7Ct1ctoYNE6jerDLwurZkE7E7x7DUxYFzAKIz pHW46a60z8zuZ2/Yg/Y7MHAu/0PQC3DUDSZCKQwI5yqixbU/l9zqrcwZAL2EdNK9kPCs 4Pog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=blFIzjLL; 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 6-v6si5598035pgz.592.2018.07.19.05.49.46; Thu, 19 Jul 2018 05:50:01 -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=blFIzjLL; 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 S1731589AbeGSNaw (ORCPT + 99 others); Thu, 19 Jul 2018 09:30:52 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:42210 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730053AbeGSNaw (ORCPT ); Thu, 19 Jul 2018 09:30:52 -0400 Received: by mail-qt0-f195.google.com with SMTP id z8-v6so7005432qto.9 for ; Thu, 19 Jul 2018 05:47:52 -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=9EV0y4Jq/QZWXMWnQmu4hP1A9LHDHt4yfnVQqzpTXvI=; b=blFIzjLLctoonekQuJXp2TJgQC+b+PNfwwsKVsSmYRf3xi1PPOUWe+zKGiZ+8DaCdV tARumXHM4rnwZi0vepiQPLT1YLOXYMQAYuqcN6G4x7pP/KmYPjzwHVdp39v/OCAPcel3 qXCgOqfvpW8BEHKFRD1ld9nQhQun6PR1/GpTnDySObdAsJ8ApSEDAG2uivEi3wm+/+O+ WUnOufedvOB0rAxpEBGTHn15qo+8QMxNAL4+PwWVQtD/RQrJBvu6TPIGTjo77mD7ZTJq qmy4p9BIg0EhR3puAUKDDns+NR9M3qM4V0XUFWcncKoicbhU+mVqZUJxz/nko+SXN5QZ 0V9Q== 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=9EV0y4Jq/QZWXMWnQmu4hP1A9LHDHt4yfnVQqzpTXvI=; b=rj27CwtmTma4e50JkOU8edpJEK580k2HWvxIVSgymEsA+MuAffhXT/XH9yuJZ0SYVK gcnB5y+I0FKhITnH/fOL4Qi0gVSRGeqsWsQVdRJ40TxJNnYmn9awNobuquyeN9GJr4hE WScN8y8UMMmJTIYg7/2lCeDzR8ZXaXLbBPMvtMT9MiD3nchI5PU2oY3JA+m8dD0HdKNN 4pUROhb5EZGkrEfh3i3jnEdbt50cN4qr8Qn1BlBOciKEzitsCmBjFDooDKh9ZkTOGt8S WTuKbyuWWheT8nQ5i9JZXaovWP6G0YlODpTZyrKAJhWpWvOR8vQd+fErW1ZOBJeIMLcp 7q/Q== X-Gm-Message-State: AOUpUlE5r35fyPTkD3c4JMkhlU7teQ7lHBZ569ZFmMpDor3fVpEG4JUj AvNLndiRA368HUQue5e5A1wz7A== X-Received: by 2002:a0c:d683:: with SMTP id k3-v6mr10534516qvi.154.1532004472024; Thu, 19 Jul 2018 05:47:52 -0700 (PDT) Received: from localhost (pool-96-246-38-36.nycmny.fios.verizon.net. [96.246.38.36]) by smtp.gmail.com with ESMTPSA id w79-v6sm5798205qkw.35.2018.07.19.05.47.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jul 2018 05:47:50 -0700 (PDT) Date: Thu, 19 Jul 2018 08:50:38 -0400 From: Johannes Weiner To: Peter Zijlstra Cc: Ingo Molnar , Andrew Morton , 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: [PATCH 08/10] psi: pressure stall information for CPU, memory, and IO Message-ID: <20180719125038.GB13799@cmpxchg.org> References: <20180712172942.10094-1-hannes@cmpxchg.org> <20180712172942.10094-9-hannes@cmpxchg.org> <20180718120318.GC2476@hirez.programming.kicks-ass.net> <20180719092614.GY2512@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180719092614.GY2512@hirez.programming.kicks-ass.net> 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 19, 2018 at 11:26:14AM +0200, Peter Zijlstra wrote: > On Wed, Jul 18, 2018 at 02:03:18PM +0200, Peter Zijlstra wrote: > > > Leaving us just 5 bytes short of needing a single cacheline :/ > > > > struct ponies { > > unsigned int tasks[3]; /* 0 12 */ > > unsigned int cpu_state:2; /* 12:30 4 */ > > unsigned int io_state:2; /* 12:28 4 */ > > unsigned int mem_state:2; /* 12:26 4 */ > > > > /* XXX 26 bits hole, try to pack */ > > > > /* typedef u64 */ long long unsigned int last_time; /* 16 8 */ > > /* typedef u64 */ long long unsigned int some_time[3]; /* 24 24 */ > > /* typedef u64 */ long long unsigned int full_time[2]; /* 48 16 */ > > /* --- cacheline 1 boundary (64 bytes) --- */ > > /* typedef u64 */ long long unsigned int nonidle_time; /* 64 8 */ > > > > /* size: 72, cachelines: 2, members: 8 */ > > /* bit holes: 1, sum bit holes: 26 bits */ > > /* last cacheline: 8 bytes */ > > }; > > > > ARGGH! > > It _might_ be possible to use curr->se.exec_start for last_time if you > very carefully audit and place the hooks. I've not gone through it in > detail, but it might just work. Hnngg, and chop off an entire cacheline... But don't we flush that delta out and update the timestamp on every tick? entity_tick() does update_curr(). That might be too expensive :(