Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp203687pxb; Wed, 20 Jan 2021 05:09:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUhV7M4FZ4JPIk8OI7giEXiWiMps7ioNn2kLORDohhZILHL8CxGTtPWuEi8eT05l9Rri6W X-Received: by 2002:a17:907:20a7:: with SMTP id pw7mr6067137ejb.283.1611148142002; Wed, 20 Jan 2021 05:09:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611148141; cv=none; d=google.com; s=arc-20160816; b=f0ePQb4ifm8eiUskiCBgERX0Ffu1amCNRgQ6wTvdfg5iV0zwmKHBNYoBYW///7LCgs A/Nu+tUUS2VfViL8/JqGOuNzLDtVjDfTFfLXHA7qkOrXS93NQBfT9U+fxJm27hati2pB +ooDlmte3zjh7HhfFHiqrPEAIzulm3ZnUpIK+sEI9jT1sKmWXtsdVA4IMCfLL6DyR+Mo ufW6iObd5xmAD/GBsdBk/W1tyaFsnNGxpLvNDoAa6+Fyyp8NicrpWn3duwln3u5Ot0Tp kTmOh1rP07HaBPvGiLtBWG93GwXzwNbJGRsqgSNCm8/sUVYPc2jLDG7vnRcaEUz68UzX jB/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7W2kDSudtc95XT0XCYed7eW3Q5/zY1dIkwgMJ4wxQ9c=; b=0KmKdYgijRsgZbeBWXMxOpPEWQ07ygq9xmQOH/5pdIsQOT2yme5jfwSl0OzBsMyc/o 3rCmsGMG8SySMYd4uZ3TXvgGTJr10Bse1YBT/MqfzHbUW6gYu13zPhQt9Nt/KWq/PYez tjJJgPd//plx8c6dqqRQMXsyYF4d9g8ArXF+TGlGBliFpLL1wf7jBt5l9vxSyBmdLUG5 2yr4PMBCala2eKHJ2TZS6WfRleyBZQBV4GmlUeBMWZEj3QPPIuKL1TnmA+dZJ6dDimuF PfpPsgAVMVvZ7LKIoHt25gDd5btQfnsupW7PCOzj2g01WA338NnD9teiAztKwpzRjvqt 7zIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nsx1v+5W; 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 a13si666194ejj.36.2021.01.20.05.08.27; Wed, 20 Jan 2021 05:09:01 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nsx1v+5W; 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 S2389587AbhATNFz (ORCPT + 99 others); Wed, 20 Jan 2021 08:05:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:43436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732532AbhATMRE (ORCPT ); Wed, 20 Jan 2021 07:17:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BF773206FA; Wed, 20 Jan 2021 12:16:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611144984; bh=FNb87Sq1yBJ8QdD3c0Vz+RCJmfo1KDxkPSW8JqoMCPI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nsx1v+5WSI9ZKBfeSazsU7DDun7VzeXG35C+MneiOskuBMWSPzyS9hRRhfnZJ6Owe qU4MzNjTLkOFQkLt38H1U6G7UTD+uVFZxPHA050ebNFSXb43jxGtueCKVqYnQUotJL Gq1sLT7xxw2sSSUQTjz74b2F6rrVZqugwdgy0HExfA1PdwYEc+Okg+8K6eNDX2fLz9 vD4gC5HE5+v+HkRaiYCCiMjRdJiC5GaoTGkuStGJxS1hz144E7n4NFqTauKM/iLhVc hMQu8sOIr+SL8K88AiqyAI3MU7lF26hIWZ51qodq580VIdwvT1xWM9GRWYyTGWmNZZ w0jssMrK4T9Lw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 72B2D40CE2; Wed, 20 Jan 2021 09:16:21 -0300 (-03) Date: Wed, 20 Jan 2021 09:16:21 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Andi Kleen , Peter Zijlstra , Jiri Olsa , Ingo Molnar , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Ian Rogers , Alexey Alexandrov Subject: Re: [PATCH] perf/core: Emit PERF_RECORD_LOST for pinned events Message-ID: <20210120121621.GQ12699@kernel.org> References: <20210118034323.427029-1-namhyung@kernel.org> <20210119024657.GA3526@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Jan 20, 2021 at 08:53:48PM +0900, Namhyung Kim escreveu: > 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. Looks sane, that way the poll returns immediately when we start seeing lost events, so tools can warn the user and then, if/when space becomes available, tell how many events were lost. - Arnaldo