From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753827AbcAGWgU (ORCPT ); Thu, 7 Jan 2016 17:36:20 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:41179 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753685AbcAGWgP (ORCPT ); Thu, 7 Jan 2016 17:36:15 -0500 From: Martin KaFai Lau To: , CC: FB Kernel Team , Alexei Starovoitov Subject: [PATCH net-next 0/4] bpf: bpf_htab: Add BPF_MAP_TYPE_PERCPU_HASH Date: Thu, 7 Jan 2016 14:35:51 -0800 Message-ID: <1452206155-1492617-1-git-send-email-kafai@fb.com> X-Mailer: git-send-email 2.5.1 X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-01-07_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds BPF_MAP_TYPE_PERCPU_HASH map type which allows percpu value. BPF + kprobe is very useful in statistics collection. In particular, bpf is strong in doing aggregation within the kernel instead of outputting a lot of raw samples to the userspace. In some cases, bumping a counter/value of a particular key will have noticeable impact. For example, doing statistics collection on received packets and aggregating them by network prefix (like /64 in IPv6). Having a percpu value can help.