Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932687AbcCHJNY (ORCPT ); Tue, 8 Mar 2016 04:13:24 -0500 Received: from mail.bmw-carit.de ([62.245.222.98]:38783 "EHLO mail.bmw-carit.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932426AbcCHJNU (ORCPT ); Tue, 8 Mar 2016 04:13:20 -0500 X-CTCH-RefID: str=0001.0A0C0204.56DE97AA.0157,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Subject: Re: [PATCH v2 net-next 0/12] bpf: map pre-alloc To: Alexei Starovoitov , "David S . Miller" References: <1457416641-306326-1-git-send-email-ast@fb.com> CC: Daniel Borkmann , Tom Zanussi , Wang Nan , He Kuang , Martin KaFai Lau , Brendan Gregg , , , From: Daniel Wagner Message-ID: <56DE97A8.1050309@bmw-carit.de> Date: Tue, 8 Mar 2016 10:13:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1457416641-306326-1-git-send-email-ast@fb.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 973 Lines: 24 Hi Alexei, On 03/08/2016 06:57 AM, Alexei Starovoitov wrote: > v1->v2: > . fix few issues spotted by Daniel > . converted stackmap into pre-allocation as well > . added a workaround for lockdep false positive > . added pcpu_freelist_populate to be used by hashmap and stackmap > > this path set switches bpf hash map to use pre-allocation by default > and introduces BPF_F_NO_PREALLOC flag to keep old behavior for cases > where full map pre-allocation is too memory expensive. > > Some time back Daniel Wagner reported crashes when bpf hash map is > used to compute time intervals between preempt_disable->preempt_enable > and recently Tom Zanussi reported a dead lock in iovisor/bcc/funccount > tool if it's used to count the number of invocations of kernel > '*spin*' functions. Both problems are due to the recursive use of > slub and can only be solved by pre-allocating all map elements. I gave it a short spin and lathist sample works just fine. cheers, daniel