From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C3C71FDF8A for ; Mon, 4 Nov 2024 22:13:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730758421; cv=none; b=HApOg4hT9d+Cxw4DXxsy0cyyhpzS+ddYmqI7aiXmdZR3/xazsr59hnAJQ7ofFQx2wmLyYxydPzC2p5czxaWuMapq/GSWDCFGe3se0hS1fRB24mgyC/9DZEwD709KSNZwU1Ckbt7+mXP/sZg62hCzAZ7glYfG/BF8SaRBkeSIEC4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730758421; c=relaxed/simple; bh=tceBlETue3lL/TSdBT7AJUOGkv6bX9R/YdQQZlAwvhY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pKmSwBKOmWvmRAX77H8q0YLAixnfgRiFWkmDxresbCfIzGK8jovc6NkdE22eoLtGBanmUdQdSF09Pv5tj2dtHfAAQyyhUOP2z7fNvkW9f1NHihC0duV/y/E1xuCPA/bO3iT5xeiSpxwlz2ujMD62esmqtKCOghe1V87o0IJwBxw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=bxxrK5b8; arc=none smtp.client-ip=95.215.58.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="bxxrK5b8" Message-ID: <85160853-cc20-40df-b090-62b4359bec37@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1730758418; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GCShT93ddGN+Y+xNVN9M7zP6TIePg8VUy8uvLGC3xt4=; b=bxxrK5b8f7mdHfGK94QArguecX+6PgP8HaSyAlXuqK+SI6bPFg3RuCIUeSiORq98awi8DP 22Mxn5kJ46Fol5Jxu98Jjzb704HYZV5CVqqNDVO6WNQ+88X1gKvyyA680COyuBzSEv+ofB IUaouAtJcPc/wpAfGYHZoowJ4zWyXQY= Date: Mon, 4 Nov 2024 14:13:30 -0800 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v2] bpf: Add kernel symbol for struct_ops trampoline To: Alexei Starovoitov , Xu Kuohai Cc: Martin KaFai Lau , bpf , Network Development , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Eduard Zingerman , Yonghong Song , Kui-Feng Lee References: <20241101111948.1570547-1-xukuohai@huaweicloud.com> <5c16fb2f-efa2-4639-862d-99acbd231660@huaweicloud.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 11/4/24 9:53 AM, Alexei Starovoitov wrote: > As a separate clean up I would switch the freeing to call_rcu_tasks. > Synchronous waiting is expensive. > > Martin, > > any suggestions? There is a map->rcu now. May be add a "bool free_after_rcu_tasks_gp" to "struct bpf_map" and do the call_rcu_tasks() in bpf_map_put(). The bpf_struct_ops_map_alloc() can set the map->free_after_rcu_tasks_gp. Take this chance to remove the "st_map->rcu" from "struct bpf_struct_ops_map" also. It is a left over after cleaning up the kvalue->refcnt in the commit b671c2067a04 ("bpf: Retire the struct_ops map kvalue->refcnt."). Xu, it will be great if you can follow up with this cleanup. Otherwise, I will put it under the top of my todo list. Let me know what you prefer.