From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6931AC4BA06 for ; Thu, 27 Feb 2020 08:50:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 416EC2468A for ; Thu, 27 Feb 2020 08:50:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ixLdfVbu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728748AbgB0IuT (ORCPT ); Thu, 27 Feb 2020 03:50:19 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:44238 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728933AbgB0IuR (ORCPT ); Thu, 27 Feb 2020 03:50:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582793416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1nyeIRe0NrbrLrsRG5PNzKkePAtGFT/fpceGBxaKfv4=; b=ixLdfVbu+SsPkdBKgIrKFhHpw7m9Ngy2sXDUwl4xkhSSWoOS1AS+4UngpUdJbrr4gLPuvW +au23EbxTVSi/ltPSzJyNBBy+xbXH5EzJAn4UxPORLnsiEjVfZJl1WOX/Y1YSNdmcdeRpe 4LAKVbroVw+oXkWxcdFvYbzqaCIPOKs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-435--LypJKN-NSOJBatdsnhItQ-1; Thu, 27 Feb 2020 03:50:12 -0500 X-MC-Unique: -LypJKN-NSOJBatdsnhItQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C17E218B9FC1; Thu, 27 Feb 2020 08:50:09 +0000 (UTC) Received: from krava (ovpn-204-93.brq.redhat.com [10.40.204.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D3E225C545; Thu, 27 Feb 2020 08:50:05 +0000 (UTC) Date: Thu, 27 Feb 2020 09:50:02 +0100 From: Jiri Olsa To: Song Liu Cc: Jiri Olsa , Alexei Starovoitov , Daniel Borkmann , Networking , bpf , Andrii Nakryiko , Yonghong Song , Song Liu , Martin KaFai Lau , Jakub Kicinski , David Miller , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , John Fastabend , Jesper Dangaard Brouer , Arnaldo Carvalho de Melo Subject: Re: [PATCH 04/18] bpf: Add name to struct bpf_ksym Message-ID: <20200227085002.GC34774@krava> References: <20200226130345.209469-1-jolsa@kernel.org> <20200226130345.209469-5-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Feb 26, 2020 at 01:14:43PM -0800, Song Liu wrote: > On Wed, Feb 26, 2020 at 5:04 AM Jiri Olsa wrote: > > > > Adding name to 'struct bpf_ksym' object to carry the name > > of the symbol for bpf_prog, bpf_trampoline, bpf_dispatcher. > > > > The current benefit is that name is now generated only when > > the symbol is added to the list, so we don't need to generate > > it every time it's accessed. > > > > Signed-off-by: Jiri Olsa > > The patch looks good. But I wonder whether we want pay the cost of > extra 128 bytes per bpf program. Maybe make it a pointer and only > generate the string when it is first used? I thought 128 would not be that bad, also the code is quite simple because of that.. if that's really a concern I could make the changes, but that would probably mean changing the design jirka