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=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 885DFC43333 for ; Wed, 20 Jan 2021 13:48:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65DF423357 for ; Wed, 20 Jan 2021 13:48:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389609AbhATNF7 (ORCPT ); Wed, 20 Jan 2021 08:05:59 -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