Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2535426imu; Tue, 6 Nov 2018 16:52:19 -0800 (PST) X-Google-Smtp-Source: AJdET5f/djPZqh1ByravSbzVuRaI+0+yBjZft9Ah9F9dJKUfCwMs/QSSaO2pA84sTvSVYmJycNeD X-Received: by 2002:a17:902:b90c:: with SMTP id bf12-v6mr27046716plb.1.1541551939308; Tue, 06 Nov 2018 16:52:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541551939; cv=none; d=google.com; s=arc-20160816; b=Oh4fqg3YHptdd/+uE+yhC19fuzlqKs9wZmFVXWkP0mUB+B8Bo+XAA7PwWO9hZPbwhx i74nBeNmHoqNcUEtdowAxDR19oLJdFR+xmLEK2yLwUPOo+TlHhNYCon+NX3VhcuWFGLC LuX5W993RvlUlXwKLBo02hi+YRKb1SO9BliwycNKmf+b++F+iZxRgQI5XwwkaOaiX7kz IHNvVrsRf8qqvpTklnK7OOWOvCfRJpH3TCLsq8InbkBmFWT32L+kdDoaZEuH9LvUru/0 O3REEGMugj9FM84GJc+mOh55hqrH5RqiM5WEXrMaM78C0Z8nVFal/Wpl9e6yGt4cbU9U CpMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=eOsyCb+7b3NbXf5l9+0ygB2zfudPiLkUWEMF/EXtl1w=; b=WWRSpHftnuvsYo81ZqsSlFtSNSsoBP28Miellc9pdfE53wHVBpJn9vzCN9CT2jJkhu cspJ3K2FFuirf9RiYXY29oSdDR/nP6ZAZWIQ0d3OfGTunwow8ZteaWmm/rcctSWtRipj NSw2JExpGlQAvt1Tcv3yExY+H0imYQYNQ0LyPsg3Pgwyex9E5+TfzUb2dwZbuogCZW+g pgXnWz6gO8SumD2uQuj3xRSmDxdbxBVxF6HmchT40S4EIRuepzIeYsXFBTshBl8CWUbl f5LeCZKN70fMDcUPlHivQWk7awZHqFW2gmq00kd+8k0PVLzv63Aam0g2+mTRQXHHtlNj j9dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kZSJwnC3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i18si7925360pgl.414.2018.11.06.16.52.04; Tue, 06 Nov 2018 16:52:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kZSJwnC3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388874AbeKGKMd (ORCPT + 99 others); Wed, 7 Nov 2018 05:12:33 -0500 Received: from mail-pg1-f176.google.com ([209.85.215.176]:34363 "EHLO mail-pg1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388515AbeKGKMd (ORCPT ); Wed, 7 Nov 2018 05:12:33 -0500 Received: by mail-pg1-f176.google.com with SMTP id k1-v6so6590192pgq.1; Tue, 06 Nov 2018 16:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=eOsyCb+7b3NbXf5l9+0ygB2zfudPiLkUWEMF/EXtl1w=; b=kZSJwnC3fHMb9vceiNHTA64KeTpYeXk96oDNEmVhhwudt+pcV+4bdygg5QpalVbiiO 1c7T6i67f5mVuhu+YyiHxCwpdQ8vijp8rkyDXFp2ySI/7JRWPooVsrphjswUb+0cPA4y vG5bGA2ujUNz5Gr83YTaEaV1hOsiAFOv1JRRoPM1ImqoDq59nqF/CvcXDq2PTCbuiOg7 NkWIqsjtg7DFIamIiWHcLMqnp9c/LCNSt736cMoAmUHLB8JgO3kvE16zxNQ+LDRg8P0X 1x6bS1ADZ5bHJ0jgdyFJc+84DjqczpcP0rwF82kfeEdtv+o4bi9GABuSmkYxZRgZdcn4 woLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eOsyCb+7b3NbXf5l9+0ygB2zfudPiLkUWEMF/EXtl1w=; b=gdHmyqchMXb66KExksY7VroYdRjW29eLw+nehiTCA0X0Es0QDpwyMva3IynE3XCxOa b/9+pEf6pZiglEJDRxaQx0GrN7qYN7P5GxwHdg80GGjPgXDPnzjfcF686519DEJqVRbh aGoWKcVEOirw6si1t6UM6J8suo6u3WK4h2w1WCyAwoGmgoagY8c3D57XInviHC9tt86s 1OXYzfGAHczgNGF1XECCD/wNEm9aa4I2OnClRguhAuAJfECQMafS5+MqLEjTYBhgzeke vd6XsDCegHV2lK8d/UQMbL1Mnj9zA8MordSTxbC7BH/sGymVJP2yZXkfc5eKNh7/HTTc kF+g== X-Gm-Message-State: AGRZ1gK3tQ+9PyNzCQ9Ypmzcn+zTzUiDA0bB62o3khhbhKz5uSoWZZa8 K/bSAkIvzcM1oWG0+GD7hH0= X-Received: by 2002:a63:65c7:: with SMTP id z190mr25765093pgb.249.1541551475481; Tue, 06 Nov 2018 16:44:35 -0800 (PST) Received: from [172.27.227.138] ([216.129.126.118]) by smtp.googlemail.com with ESMTPSA id j186-v6sm14670867pfg.117.2018.11.06.16.44.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Nov 2018 16:44:34 -0800 (PST) Subject: Re: [RFC perf,bpf 5/5] perf util: generate bpf_prog_info_event for short living bpf programs To: Alexei Starovoitov , David Miller Cc: Song Liu , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Kernel Team , "ast@kernel.org" , "daniel@iogearbox.net" , "peterz@infradead.org" , "acme@kernel.org" References: <6C5A9FBD-F50D-444C-9038-E9557EC850D2@fb.com> <27fc8327-3390-ba5a-6063-89c9e7165e7b@fb.com> <20181106.153647.1701013551426767213.davem@davemloft.net> <39fe6abc-5c3e-bac3-0c0b-cf68bea23ab0@fb.com> <0a05a14c-3a79-e894-ae48-cbe1df4feb91@gmail.com> <82745121-339e-2751-c9db-d1fca02d0b33@fb.com> From: David Ahern Message-ID: <7d0b100b-a64b-0d30-8ec0-2689ef44423d@gmail.com> Date: Tue, 6 Nov 2018 17:44:13 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <82745121-339e-2751-c9db-d1fca02d0b33@fb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/6/18 5:26 PM, Alexei Starovoitov wrote: > On 11/6/18 4:23 PM, David Ahern wrote: >> On 11/6/18 5:13 PM, Alexei Starovoitov wrote: >>> On 11/6/18 3:36 PM, David Miller wrote: >>>> From: Alexei Starovoitov >>>> Date: Tue, 6 Nov 2018 23:29:07 +0000 >>>> >>>>> I think concerns with perf overhead from collecting bpf events >>>>> are unfounded. >>>>> I would prefer for this flag to be on by default. >>>> >>>> I will sit in userspace looping over bpf load/unload and see how the >>>> person trying to monitor something else with perf feels about that. >>>> >>>> Really, it is inappropriate to turn this on by default, I completely >>>> agree with David Ahern. >>>> >>>> It's hard enough, _AS IS_, for me to fight back all of the bloat that >>>> is in perf right now and get it back to being able to handle simple >>>> full workloads without dropping events.. >>> >>> It's a separate perf thread and separate event with its own epoll. >>> I don't see how it can affect main event collection. >>> Let's put it this way. If it does affect somehow, then yes, >>> it should not be on. If it is not, there is no downside to keep it on. >>> Typical user expects to type 'perf record' and see everything that >>> is happening on the system. Right now short lived bpf programs >>> will not be seen. How user suppose to even know when to use the flag? >> >> The default is profiling where perf record collects task events and >> periodic samples. So for the default record/report, the bpf load / >> unload events are not relevant. > > Exactly the opposite. > It's for default 'perf record' collection of periodic samples. > It can be off for -e collection. That's easy. > So one use case is profiling bpf programs. I was also considering the auditing discussion from some weeks ago which I thought the events are also targeting. As for the overhead, I did not see a separate thread getting spun off for the bpf events, so the events are processed inline for this RFC set.