Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2513238pxb; Mon, 18 Jan 2021 21:47:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHlGo9COp3RdG+MrOuWLCtlTGyPjJqtT6T/BtVsZwLykDSqn/MlSQ1fdKACwD87BuK4jz4 X-Received: by 2002:a17:907:7292:: with SMTP id dt18mr2008035ejc.317.1611035256590; Mon, 18 Jan 2021 21:47:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611035256; cv=none; d=google.com; s=arc-20160816; b=d15vlA4FsWgLG7uiyZmTze+/nRYs1BQuN7Nq3hpU8Xy+f4bF03qx9On5vvU4BUpN1B iA8hBI19yKbbRLfmK7kuIak8k27MAAJmzXrW3vXaotfwTdklt5AfhEXjYSFQvtzMH1Tw 4uVNeNo217lKfZq1S5DD8YgQTXqhTMjW7R4+FLUQ+W/bZUEBU/BxNayTP3Aso9YySNfb GXbKONACZ+9llw1nzWxRzKETMIADmjdoGaZObmGJOdZll+9GCdFfH8ZQbytLHoVI9UqP VSemaxW8JYcP2uyo1y6SLnjyNIr0xD5PAEunw5XiYnNdzY3nj8BnqLoynBDhGo+oh1Tx CYCQ== 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=jvUY/VeZrCIqhPzWRGIVqTe2E15aU4shIkqn8ZCXmHU=; b=TO+j4zHZgtvRDL4bLnfT9lkk8NKypJIKGEYDqX6OEWK6kREXbWfK4FRqg2S2yk8jFy pFe2109lnwkT5mhHiXTfs6RDO0oYrcZC5hhL7EELUM0CNnRKfvB6Ft82ZGpyq+SA57yz /llT0OCBQAP9K89ykLUoVzmiHxynGOjlrdMyeK78LCVCCzylxke+NuTvcV4uAhq9aUXb OGurua22uwOYX0ydmxp1l6/9+dlU7byuzXVL0DOzrKXSeGjEbO8gb2FIVv2v9h160Wde VQu0YfiQ64bdcpVuUvvZ7tC0zt/fuHW0u7qu3VTixP+Dyx+kAqCUb72DKL8FOZmiC/lL 8xrw== 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 i13si2897413ejz.170.2021.01.18.21.47.13; Mon, 18 Jan 2021 21:47:36 -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 S2394796AbhASDMw (ORCPT + 99 others); Mon, 18 Jan 2021 22:12:52 -0500 Received: from mail-lj1-f172.google.com ([209.85.208.172]:38614 "EHLO mail-lj1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388715AbhASDMw (ORCPT ); Mon, 18 Jan 2021 22:12:52 -0500 Received: by mail-lj1-f172.google.com with SMTP id n11so20321832lji.5 for ; Mon, 18 Jan 2021 19:12:35 -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=jvUY/VeZrCIqhPzWRGIVqTe2E15aU4shIkqn8ZCXmHU=; b=bqrcoTUeOTikx5GXliofWp3nO2iIIts/ytTgrB+tmECTI1kA5iVUGcL8O6Rr7TmD3V QuWR6GxBriikXtt7ejNQaGsg8uIRJ+yWdeI2NZlG+a0nJOg7zKQurRYJcxsw/33Pjgje moaUeB4ooCD2/3htqr5nawWn7ubfCgWui6vUODB5ibk4WV2ug1jx/g8kzDh4neqgpAom JEYHgapF5USuzVEMpG9YGnzPGQWoig6OYUjvJMbq35/B4XpajHYI/XzMk6sFYSYyGmUY qVtiRMrPRSz1ILhingj5MBBarMrrxkhOE7E3hpsSeyXo5kT5AvG/zEfrbMpKwgt7u39I U1PQ== X-Gm-Message-State: AOAM530hfr2YJtU1s1bqlCgksC26bidvRvTmqLF/icCR17Q6HfpW4ZVK s46xXvRYBZu5+Aq+Z7LGh3DgI31N/cJbLYUeUtI= X-Received: by 2002:a2e:b04e:: with SMTP id d14mr965124ljl.26.1611025929836; Mon, 18 Jan 2021 19:12:09 -0800 (PST) MIME-Version: 1.0 References: <20210118034323.427029-1-namhyung@kernel.org> <20210119024657.GA3526@tassilo.jf.intel.com> In-Reply-To: <20210119024657.GA3526@tassilo.jf.intel.com> From: Namhyung Kim Date: Tue, 19 Jan 2021 12:11:58 +0900 Message-ID: Subject: Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events To: Andi Kleen Cc: Peter Zijlstra , Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Ian Rogers , Alexey Alexandrov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andi, On Tue, Jan 19, 2021 at 11:47 AM Andi Kleen wrote: > > > > I don't think I object to having an even in the stream, but your LOST > > > event is unfortunate in that it itself can get lost when there's no > > > space in the buffer (which arguably is unlikely, but still). > > > > > > So from that point of view, I think overloading LOST is not so very nice > > > for this. > > > > But anything can get lost in case of no space. > > Do you want to use something other than the LOST event? > > Could always reserve the last entry in the ring buffer for a LOST event, > that would guarantee you can always get one out. A problem is that we can have more than one event that failed. In my understanding, we keep the lost count and add a LOST event when there's a space later. So probably we can keep a list of the failed events and do similar for each event. Or just use a single event to notify some number of events were failed. Thanks, Namhyung