Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2475485pxb; Mon, 18 Jan 2021 20:28:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6Ji0iLjn4vG4bPUHbdY3D3jYQZYiEtfcWcxy3+OAZVwFfNLQpSxX5M5MGShojr/+1sKE7 X-Received: by 2002:aa7:c802:: with SMTP id a2mr1910559edt.120.1611030507671; Mon, 18 Jan 2021 20:28:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611030507; cv=none; d=google.com; s=arc-20160816; b=nHnGK3bwfa3KFQc4HqrSo8THQ482CvNdwNMckEbeiSjSxK7YiEf7S6MhkDuntW6FNX xYIVWqmu00uCO3QkcUF3tKuA0yKipR56KgytflH670kzi3Xag7C5bhHznUzG37IBo2rU uGUq9OCAQCxeRNTQbTRKCl1YuuDVrg9GcicwsmgLKJcFvLLQpWk7Hf5dg1gmUV+c2ZPo QJ3Sc5Nnu73RMXRTdjIQhv9gFlYelyFdOZE9LQeIG4hkktE2Qx8rQEeRgbOX03iArCL7 L+BIUNyPB4vBZ0GZNUv/FYDiNwDv/5g+myKz4UzzrjkRYkzPMQXk6DZIuOe1qpkFplw9 Yidw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=Oo2wTOBVbYOJ6gk7kSBKlMDMgikCLwk64Nd1TJ5u0AM=; b=Z5wbMw0qQieUaJvNN6SWliku9KP3S85o9VeOU7oYdkWqOX8pkApPU9FVDg3gKyFX6n SwjRnr6i43J7+7YFuGM8TFaTJ0SUhg31wguA5PvPtBkycIuroonCIxq10Hmz6qhdbiB1 La1zc4haWbvz5aN2+jdYVbNydEiaJPq30AXb7i5XSImw+q7ALYhsgz6doINIIDZBZVgv cpD2xMgWBozQ4Web3SuffTFds1pp7gjDA3Oa3C/hdjci+ocLAZvBozM2rjGGk3pdRrS/ yLFWym+wPq12iDAgcaJWQOYR7dKqIpJ5j6TA++VRJZboCf2kiYmcKHriLMGTb1+OI6zq 9KYQ== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a17si8397831edn.146.2021.01.18.20.28.05; Mon, 18 Jan 2021 20:28:27 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404437AbhAROS5 (ORCPT + 99 others); Mon, 18 Jan 2021 09:18:57 -0500 Received: from mail-lj1-f180.google.com ([209.85.208.180]:41135 "EHLO mail-lj1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390459AbhARLpN (ORCPT ); Mon, 18 Jan 2021 06:45:13 -0500 Received: by mail-lj1-f180.google.com with SMTP id f11so17882716ljm.8 for ; Mon, 18 Jan 2021 03:44:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Oo2wTOBVbYOJ6gk7kSBKlMDMgikCLwk64Nd1TJ5u0AM=; b=Oca7raApiiBuFtrLL6m1eOBjouLgHqsD7kpeUy+bneLxX319wsj2tjTxXvC1P1R6LF L9j5ELZc4tFziDv8YzBpCCIAsXOVhC/qZqD6RsZofjg4MCYaBxUvYIDQrBinqVbsQhZK 1iNV0hARXDJePYFlxNz2yNoE+hKpS157qQDO9KGpa2idiIINyRNsEIJ9gYWB7FgLSP0Q SXdPJm8b8bAAZJFskCZaSE5jUEnSscLwc6cEqSXEEaT+wBHttE0jBSNim1uiO0KcwSdH 5SGDxUhyJ4NE34vcBsNWJIU8QrN1N3L9PSvv32zelLsIqXDnW7dXbWFb0ESdYNWgpu/T M8EA== X-Gm-Message-State: AOAM533bO0+b1kyp9RgtQ/v7tCs/lWwz2tfpxN10bLqaqN5/HmYGUWDK DBshYkjI3AOFbefiLrUVpkj5PnDG/iKsAE+FvXQ= X-Received: by 2002:a2e:870e:: with SMTP id m14mr10328879lji.166.1610970271528; Mon, 18 Jan 2021 03:44:31 -0800 (PST) MIME-Version: 1.0 References: <20210118034323.427029-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Mon, 18 Jan 2021 20:44:20 +0900 Message-ID: Subject: Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events To: Peter Zijlstra Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Andi Kleen , Ian Rogers , Alexey Alexandrov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On Mon, Jan 18, 2021 at 7:11 PM Peter Zijlstra wrote: > > On Mon, Jan 18, 2021 at 12:43:23PM +0900, Namhyung Kim wrote: > > As of now we silently ignore pinned events when it's failed to be > > scheduled and make it error state not try to schedule it again. > > That means we won't get any samples for the event. > > > > But there's no way for users to notice and respond to it. Let's > > emit a lost event with a new misc bit to indicate this situation. > > Users should get a read(2) error IIRC, does that not work? Ah, right. maybe I'm too specific to perf record's perspective. In perf record, it doesn't use read(2) so I thought it should have the information in the stream of sample data. Thanks, Namhyung