Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3868719pxb; Tue, 17 Nov 2020 05:49:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzl+S10eSNsyA9pWAkrLTHBjT5BsnBApM5WSqYgr5chZFeOHfOBcZuf3ra4W4Dm2pzCMZo1 X-Received: by 2002:a50:f613:: with SMTP id c19mr2805973edn.188.1605620947261; Tue, 17 Nov 2020 05:49:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605620947; cv=none; d=google.com; s=arc-20160816; b=PqE5h8JlcZxoDAimvFjrOrwzWeIgEDKIQQWk51INAZXKNvZCQej158W29MrpDXjvFq q3d70OmF6R0qQseXYZ5iQmv0/zLW3ndG2/MnU9MqrD/pMPhT6JEHt7oPNxjo4uyV4apn bj9xC//j17MCTMqnhgLyskXdHCtOogzsy1D2jMqFS5HGL30ayZyjmsXLuASIF1HAhmeU gvpJiN6IJnA5RJsDM2yNJy0awsoIeoWGo0zyS2pTmB7x+HP084ZxFnCCu6pOpE0CJktX 8WzP8E4zrI2vsgYDfJ2RAc2TF1fVnPAneUXyH2YvLP/T3+e+DZEERiCoCJxq0pV6jEaT 5OjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N0xxPTon7r2TCXFvy3OkRpJT2VvLBn5bzah25s/llFE=; b=cQ7DpDbC+lzmLn95ErTLQqpYZdRkr/DNN3zjSUGRxr083NzZJqp+Tn7FLLkIm6lPpS 011OIBOF2McvHgJtqhzCKFdFHT6cnBdiwjnp3xn7z7xJ1X00RdToaeXqAJDBxzD4Yyry 7pQ3km6luuu+xumxvRshB6A/9GY3pT9GB6ZGwE5Mpq4YAfxC128rtQy8+ThvMcBbzbyy ZMHeIJqybDCTGgwRVw9eG2VSkeaN5BvRdeqK+nTzuQSqGI6j0qOzeB8RYl7XWvAHtMWw OfGmKRARMub83b5ygNuGF6eXCFWOz/ZS/ENewcxSUVfNCIuphyOmMPGfO6ee9Qm9GC5E tfhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Lhzip1Fq; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x14si13921412edj.87.2020.11.17.05.48.35; Tue, 17 Nov 2020 05:49:07 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Lhzip1Fq; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732597AbgKQNjC (ORCPT + 99 others); Tue, 17 Nov 2020 08:39:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:50290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732672AbgKQNis (ORCPT ); Tue, 17 Nov 2020 08:38:48 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 099FC207BC; Tue, 17 Nov 2020 13:38:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605620327; bh=ukp620K4yYyVPbyJ05RHjLjLRFfL43RGcfN+nHHVND8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lhzip1FqOA1JgtoKA38vNNnRAOk3zS/PNP9giMY4H5reqtaHy5Q7PeoAoeZXOBIBL G8EIHRk56NnDqz2R6xMyQWPqnNTghN9GQhCjn7F/o5pWC7nHvLi+VY4icC4EjB9T+2 ic0AzGFzzVRcAZOtsD8Ry9konhccEJ/gDv1xZJhY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andi Kleen , "Peter Zijlstra (Intel)" , Sasha Levin Subject: [PATCH 5.9 181/255] perf: Fix event multiplexing for exclusive groups Date: Tue, 17 Nov 2020 14:05:21 +0100 Message-Id: <20201117122147.736654851@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122138.925150709@linuxfoundation.org> References: <20201117122138.925150709@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra [ Upstream commit 2714c3962f304d031d5016c963c4b459337b0749 ] Commit 9e6302056f80 ("perf: Use hrtimers for event multiplexing") placed the hrtimer (re)start call in the wrong place. Instead of capturing all scheduling failures, it only considered the PMU failure. The result is that groups using perf_event_attr::exclusive are no longer rotated. Fixes: 9e6302056f80 ("perf: Use hrtimers for event multiplexing") Reported-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201029162902.038667689@infradead.org Signed-off-by: Sasha Levin --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index c245ccd426b71..a06ac60d346f1 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -2597,7 +2597,6 @@ group_error: error: pmu->cancel_txn(pmu); - perf_mux_hrtimer_restart(cpuctx); return -EAGAIN; } @@ -3653,6 +3652,7 @@ static int merge_sched_in(struct perf_event *event, void *data) *can_add_hw = 0; ctx->rotate_necessary = 1; + perf_mux_hrtimer_restart(cpuctx); } return 0; -- 2.27.0