Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753279AbbGaQgl (ORCPT ); Fri, 31 Jul 2015 12:36:41 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:33986 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752820AbbGaQgi (ORCPT ); Fri, 31 Jul 2015 12:36:38 -0400 Subject: Re: [PATCH v5 1/4] bpf: Make the bpf_prog_array_map more generic To: Kaixu Xia , davem@davemloft.net, acme@kernel.org, mingo@redhat.com, a.p.zijlstra@chello.nl, masami.hiramatsu.pt@hitachi.com, jolsa@kernel.org, daniel@iogearbox.net References: <1438343970-11974-1-git-send-email-xiakaixu@huawei.com> <1438343970-11974-2-git-send-email-xiakaixu@huawei.com> Cc: wangnan0@huawei.com, linux-kernel@vger.kernel.org, pi3orama@163.com, hekuang@huawei.com, netdev@vger.kernel.org From: Alexei Starovoitov Message-ID: <55BBA414.7040106@plumgrid.com> Date: Fri, 31 Jul 2015 09:36:36 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1438343970-11974-2-git-send-email-xiakaixu@huawei.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1475 Lines: 30 On 7/31/15 4:59 AM, Kaixu Xia wrote: > According to the comments from Daniel, rewrite part of > the bpf_prog_array map code and make it more generic. > So the new perf_event_array map type can reuse most of > code with bpf_prog_array map and add fewer lines of > special code. > > Tested the samples/bpf/tracex5 after this patch: > $ sudo ./tracex5 > ... > dd-1051 [000] d... 26.682903: : mmap > dd-1051 [000] d... 26.698348: : syscall=102 (one of get/set uid/pid/gid) > dd-1051 [000] d... 26.703892: : read(fd=0, buf=000000000078c010, size=512) > dd-1051 [000] d... 26.705847: : write(fd=1, buf=000000000078c010, size=512) > dd-1051 [000] d... 26.707914: : read(fd=0, buf=000000000078c010, size=512) > dd-1051 [000] d... 26.710988: : write(fd=1, buf=000000000078c010, size=512) > dd-1051 [000] d... 26.711865: : read(fd=0, buf=000000000078c010, size=512) > dd-1051 [000] d... 26.712704: : write(fd=1, buf=000000000078c010, size=512) > ... the commit log doesn't really need these test results. Also first paragraph is meaningless without prior history. Please reword it, so it clearly says what this patch is doing and why. Anyone reading it years later should be able to understand. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/