Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp174672pxb; Wed, 20 Jan 2021 04:20:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqaM2DSF2MfPp3OnOxmEKPZpdwkWNHSTe2b+TWfD7ObqGffCqtBprm4b4iiiG2QANHiFbT X-Received: by 2002:a17:907:20b9:: with SMTP id pw25mr5801468ejb.262.1611145221605; Wed, 20 Jan 2021 04:20:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611145221; cv=none; d=google.com; s=arc-20160816; b=Q2HwleteROqhQsX/xgBqiNfc6Q93a6oGGUZ4+TQvf6yDnXDg4XaE86bjjhwLW6azJk mBTIBNIEF82ug5BZe/JIWcOT7JjgOx3OL9jr0VbFf28YKidKy83nkOysJUG90gBGk2iq wlJDlZYngC3pbES22p2Obr9qYeVDHv7Eyep+/rbSpUN4OlIpoXQ1hNkFDLq8thJC/xUa 0bTCx5Cp3Qd9oZBoGTS6HiJL0wcBvISMAZTXYscin0DBqij36sJ//pJPv+odVOEmy+6N AnTikqpuakfFXdSjShNuAeuzlyyVa+2PX8C0AgN7UscNPwUGkYBTRX9gn/zgt3m0YfwE bVow== 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=NL9fVoZhOlYXsEj2VdzaNioQ9TslBUkbYBTGCKXOJV0=; b=uUWiCPiNtqqsptczyaFneQdCX0RW9+Nt1X5p0p8o2afM7mGlaG57y1IwRhgClkrArk 6OPSyunJqiiAhGuSH6ZUMcJB1tIHFkjad80dEOaKug71oqUbDZ92IfbSsyFhmY3Rkv/S qlmU0bNXCJs+zv452q+x8o8s3WHMF0Ac8JpOiVhw0OwyTbkr5kofGtYoBa3+7NvUWYn8 LFlQMznRR+PP4mUE2cmet+8q8rxTtwZGOuHIcrEdN48Q4Uo9SLwhdsbiRG2SjQqe+kg1 thBYKYmz2WqYUARV8E+qqbYZ3zelXeeQngXMdpotN7RRyf6DZ7MKrZqP+A1D5F2QsdYO 5GPg== 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 c11si762267edy.313.2021.01.20.04.19.57; Wed, 20 Jan 2021 04:20:21 -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 S2389492AbhATMSB (ORCPT + 99 others); Wed, 20 Jan 2021 07:18:01 -0500 Received: from mail-lf1-f54.google.com ([209.85.167.54]:39338 "EHLO mail-lf1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730516AbhATLym (ORCPT ); Wed, 20 Jan 2021 06:54:42 -0500 Received: by mail-lf1-f54.google.com with SMTP id h7so4485213lfc.6 for ; Wed, 20 Jan 2021 03:54:25 -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=NL9fVoZhOlYXsEj2VdzaNioQ9TslBUkbYBTGCKXOJV0=; b=eRT7OAlDQm3Yt2GQxOf+cts2+3xflkKcx/NZWeYctjlziskulJXZKBYXC24h4NKaXS OCrSebqAfTs/45Qnm4tKtd1ez4cdWxu4zE4ZTQaysRgAG508iE+DMTiAlDAbHcw30grB RwJd7izXLm8wZieHJLx246TGsCgd2QeRwtciEP3d5yDohq5FlttLIo/RSHuUCA2mfBh0 xsxa5bSVHNhVhpNQY8xU8vCaPjcqO9Or5ouhGzvchn+t+AFmmehO6McKxmddxoRNj7ki lMy1u5J9EBVSHDHVeRRu48JHW0t7i1oTf65lYhDlE2g3CjHSuPyOva44Rrnm68w2w0/k 5Qjg== X-Gm-Message-State: AOAM5314XEoS0T0P6cpl/bR8s5RJ6LhxQypyiG5uZCXW/OqtAw0krlXp P1XwGIqvvSM2FFDxpZEIVBrgV0oB+jkdkYT/DJo= X-Received: by 2002:a19:40c7:: with SMTP id n190mr488653lfa.635.1611143639470; Wed, 20 Jan 2021 03:53:59 -0800 (PST) MIME-Version: 1.0 References: <20210118034323.427029-1-namhyung@kernel.org> <20210119024657.GA3526@tassilo.jf.intel.com> In-Reply-To: From: Namhyung Kim Date: Wed, 20 Jan 2021 20:53:48 +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 On Tue, Jan 19, 2021 at 12:11 PM Namhyung Kim wrote: > > 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. Stephane suggested emitting an event for poll() like EPOLLERR or EPOLLHUP. I'll take a look at that. Thanks, Namhyung