From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDC11C433E0 for ; Mon, 18 Jan 2021 14:19:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A8FC22B4E for ; Mon, 18 Jan 2021 14:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392856AbhAROTD (ORCPT ); Mon, 18 Jan 2021 09:19:03 -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-Google-Smtp-Source: ABdhPJxo36mC0IdbUyKtQNnPXxWeMcjY0ogllArVF8wbWjFRbHr2XbCzys8GKMzL/z4q9ZCfyXctXi8Zsuc9TFPpRZI= 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