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 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 84EBBC433E0 for ; Tue, 19 Jan 2021 03:13:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 393F920848 for ; Tue, 19 Jan 2021 03:13:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394839AbhASDMy (ORCPT ); Mon, 18 Jan 2021 22:12:54 -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-Google-Smtp-Source: ABdhPJyrONS9eH8DW3LnoewIHYBwQc/PiImfSRjUAHqCz7fOTyXSxcIwq410BJgaakBlyu+ZNUC119ojJhtBlidzmdo= 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