Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3026815pxx; Sun, 1 Nov 2020 19:54:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9CgsBDURi3dGN08UU8b7HToKqhafqL+lCcTNMdJB8ZBfnUVKnedTT5oQMzdmX14xgfvlA X-Received: by 2002:aa7:d2d2:: with SMTP id k18mr7901037edr.290.1604289286278; Sun, 01 Nov 2020 19:54:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604289286; cv=none; d=google.com; s=arc-20160816; b=gZLF1M6efR9jKsVqfH1DM3vT5HR1aXEAFtWedsr5uiayo31OVKT+nHRHvF2Dsu1AWh +FybhYpAY3QyZMh4QTdzX0rYE8pCuKGmJCqtmy4ZcVXzYyLDrHOXX3SIxAqpIIKP6nHD XbZ3QnfCaM4kpT+utnkXwQhBeMgbrJoVv9O3EJ/8xdIYR4x6Naj2gUKxPpBaS0tW1Yhf 1PYd3e2ywBtAY6WOw3TNEg5mTH31fYQ8hl9JRC8wogejPeUqLtTNbTfgqPbfdwayIpzA t/RlVTit+tEibZ+E6yXjGLDZgnrs41QDQOU4wSLtIHkBamvDIrYexcRo0bMLyEz0pFJ2 nc/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=kBqYm/BBsyCnbEJpV+uiMCmBcoGktxXoGaVDKQ0c1qc=; b=FszKDCDosnuAL5ttnSMHGV3brXOI/BkS2XvEmxxAN7F3Po2afufaKT+FxP6Ez8/nV0 GQu+1xRgoB5jBNlYQwjzCH3Xse0i3tN0nFmlcu+Esa+GR7DOMGrkbR00gKTG9hpBVzLs ZsXouTkRf8sk3h66uJYwIN18CyMMFGTVQ5H69vq31y7vxdIlr4ZY/muS0ZcNNoDIzFla 61+Uu89zIj/DsczS/LnD5geyu59XKzaudet82CvAqrq9NsQ0fQYygHf9hG5GaVs+7E6+ fPzl0gOGD4PqQOAB2GI/hsr/W+UjEsFVKuLq+frae73uqZLueeXP1cvsIvpJZgKGwN23 J1mQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h2si9215993ejd.547.2020.11.01.19.54.23; Sun, 01 Nov 2020 19:54:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727692AbgKBDwk (ORCPT + 99 others); Sun, 1 Nov 2020 22:52:40 -0500 Received: from mga05.intel.com ([192.55.52.43]:54948 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727555AbgKBDwk (ORCPT ); Sun, 1 Nov 2020 22:52:40 -0500 IronPort-SDR: I6tvaO1szkz/GXnNCmND6EnzE/ZfZ5HYflKFk7ETEy2vQ9l9xaRQ2htxxX2DMefJQMlPMLL6xe UcbMu4KoaqDA== X-IronPort-AV: E=McAfee;i="6000,8403,9792"; a="253539030" X-IronPort-AV: E=Sophos;i="5.77,443,1596524400"; d="scan'208";a="253539030" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2020 19:52:39 -0800 IronPort-SDR: 7XYA97HlNl4tMaJ3/eXsZlzsLztgnXXxYypIuVBtjHh4owLf4H38/u5g55MQujnzTG5vk8GpqF nE9yq4yNsa5g== X-IronPort-AV: E=Sophos;i="5.77,443,1596524400"; d="scan'208";a="537860747" Received: from tassilo.jf.intel.com ([10.54.74.11]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2020 19:52:39 -0800 Date: Sun, 1 Nov 2020 19:52:38 -0800 From: Andi Kleen To: Jiri Olsa Cc: Peter Zijlstra , mingo@kernel.org, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, eranian@google.com Subject: Re: [PATCH v2 0/4] perf: Fix perf_event_attr::exclusive rotation Message-ID: <20201102035238.GI466880@tassilo.jf.intel.com> References: <20201029162719.519685265@infradead.org> <20201031234418.GE3380099@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201031234418.GE3380099@krava> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > hm, it's too late for me to check ;-) but should I be able to do > this with exclusive event.. running both command at the same time: Yes. The exclusive part only applies during a given context, but the two commands are different contexts. You would only see a difference when in the same context, and you have multiple groups (or events) that could in theory schedule in parallel e.g. something like perf stat -e '{cycles,cycles},{cycles,cycles}' ... The main motivation is actually that the "multiple groups" algorithm in perf doesn't work all that great: it has quite a few cases where it starves groups or makes the wrong decisions. That is because it is very difficult (likely NP complete) problem and the kernel takes a lot of short cuts to avoid spending too much time on it. With exclusive it will be possible for a tool to generate "perfect groups" in user space and assume the kernel schedules it dumbly, but at least without any starvation. -Andi