From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload Date: Thu, 20 Sep 2018 15:56:51 +0200 Message-ID: <20180920135651.GW24124@hirez.programming.kicks-ass.net> References: <20180919223935.999270-1-ast@kernel.org> <20180919223935.999270-3-ast@kernel.org> <20180920084424.GN24124@hirez.programming.kicks-ass.net> <20180920132545.GA19861@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexei Starovoitov , "David S . Miller" , daniel@iogearbox.net, netdev@vger.kernel.org, kernel-team@fb.com To: Arnaldo Carvalho de Melo Return-path: Received: from merlin.infradead.org ([205.233.59.134]:35766 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730955AbeITTkg (ORCPT ); Thu, 20 Sep 2018 15:40:36 -0400 Content-Disposition: inline In-Reply-To: <20180920132545.GA19861@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Sep 20, 2018 at 10:25:45AM -0300, Arnaldo Carvalho de Melo wrote: > PeterZ provided a patch introducing PERF_RECORD_MUNMAP, went nowhere due > to having to cope with munmapping parts of existing mmaps, etc. > > I'm still more in favour of introduce PERF_RECORD_MUNMAP, even if for > now it would be used just in this clean case for undoing a > PERF_RECORD_MMAP for a BPF program. > > The ABI is already complicated, starting to use something called > PERF_RECORD_MMAP for unmmaping by just using a NULL name... too clever, > I think. Agreed, the PERF_RECORD_MUNMAP patch was fairly trivial, the difficult part was getting the perf tool to dtrt for that use-case. But if we need unmap events, doing the unmap record now is the right thing.