connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared"
Message ID | 20240209091659.68723-1-wangkeqi_chris@163.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-59151-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp731525dyd; Fri, 9 Feb 2024 01:31:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUbAielLa5P+/75Si4L5t35Eu6QIVq7uJuby1CHtEauK+3KuY+dMupcjKIG9s1WV+lVtPFwtP51zan2MeUY+F5sjjNT9g== X-Google-Smtp-Source: AGHT+IFNRGO/Otq5FPjHkxezQYkF3n9irtpmjNlpbuQmBFVM4ExQrDvXRmQLISEe5d3OFGASAQmR X-Received: by 2002:a17:902:e5cf:b0:1d9:8082:4577 with SMTP id u15-20020a170902e5cf00b001d980824577mr1113719plf.17.1707471117921; Fri, 09 Feb 2024 01:31:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707471117; cv=pass; d=google.com; s=arc-20160816; b=XQ5TArX8uVV1oOVRXjEyfewKqFZKFxuSXV75S0Y+1z0DlfjVUDoGopwkvysVwXKuJh nYTT07ZXCxcYHMcvqXubP5Rh9KAbqaK5qddIW118n0Au1/0Yn9m6dupk25upmdvss073 U/5DM3NxhhkALuSTfGQIRm3r1qlZ7figtag9tnUuuPxSZL7KdzzvvAoiS3bzziURHzN+ Jo+ac7UmEEMJvoIhZsEfY2WelgVpVcvRSh4l5vnBtOgWgs3LsznOsXcod2+OngE6x6XJ cmorZEpW+S4ScZBs3TJRP4R6kDyrz0cF+cTQrvCqZahaNndxnziZtwqjsPcWhejFz2FW NIZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=1fYYRFcHkrovkS6o/dnOwQFLyvfstYRX8I/lzb+zlVQ=; fh=wNN1tX7WSzucvlREnIhyZcst0uoYUyuThOmpq5jfydE=; b=VGIpIWKNOalL8S0UVXCsXy15w2gv/gSD7vvEm6a+1e2uI24wbX2J3U1YOChd8d1T34 Na+5w+UjSlECcbmKdZO/qX++IM+pRO43y9ymJqoB8rtYGXuF5Nhe0T8Yn6iUihQnhefB 6IsRAVwsZSK/uBKPvshcd+xeFIRD6p18ZL/1Pz1aEoDBn/kFb0miN7Ul2W4ZJhCiUxbP R5dK5ZSh3qx1JgDgKcY3mfyQdzC5Nd5/qXNNmlfo3EPk9lUm2xHNr1btI3pdaWpUzF7k g/BCRngKQtJH/8DuaeUPCXIrEncZvA144j34Ieg5z2I+Rxu8+kW4S2E2MjIPxtoqOkKx weNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=oTF1xsyb; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-59151-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59151-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com X-Forwarded-Encrypted: i=2; AJvYcCWP+GINb5zH10aR3WUGhTWiU0tJLpKOr34hUBibsl3R7mzqvrETG8lAPt2bfAoSSHVh8V5lpxaN/jT9LBSUI7xasYMbNQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id f9-20020a17090274c900b001d8d5bd2853si1346789plt.30.2024.02.09.01.31.57 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 01:31:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59151-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=oTF1xsyb; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-59151-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59151-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B22AAB20D6E for <ouuuleilei@gmail.com>; Fri, 9 Feb 2024 09:19:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A09B5664D5; Fri, 9 Feb 2024 09:18:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="oTF1xsyb" Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.219]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A43B1664DE; Fri, 9 Feb 2024 09:18:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.50.219 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707470331; cv=none; b=VaUHkkQlERRUNl+f1SBN4sXviitbrlhUw4d2lIqpz9LOyVCmqYUdsjEpxA1FhXSxvEifcVY33PsBIPpMQe4C9KhGMHF4tPJ/cnpOyBElqujSp5Ce4q5g0eRD5uonN5Nq2ix0m+gCvP9Ftt/puRSuTFjeV2vCeq/CtbZlZVUPqRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707470331; c=relaxed/simple; bh=o8WTKGtgzdcRV2Jd2WquBihArE4w4ZkF4hZvS73clBg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=pSgPQeCVR0Y90JHhjxGpX9vMv3JD6j0tJ52NfkqmdGVu/EUSijcCxl6fb7qje0lNgbr+RaVGJosUM5K1SEnSfNbEvDs66DX4iN8CjrQ7RZlR7T6fS0tMZsQ7egTCG457ksZ2+g/eMZUjKIgSpKuZ9gk0z2up6cRtSZZ8c8qpYF0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=oTF1xsyb; arc=none smtp.client-ip=45.254.50.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=1fYYR FcHkrovkS6o/dnOwQFLyvfstYRX8I/lzb+zlVQ=; b=oTF1xsybC5+tdrzRoBY0+ 1qlXLhC8BNPKXWyAWOAxohnj/fiNAlHsRSiruYh6/N05+it2h83eas3jZz/G5J6z 3O6T7Zk+5hyYpxdRmheTxIqGXnAvY8CIJOzoNp12L6WogR9KUV3iURtzW6gHIB/e 0ckRpCtMrtYk8vrUi+PEbQ= Received: from localhost.localdomain (unknown [111.202.47.2]) by gzga-smtp-mta-g0-0 (Coremail) with SMTP id _____wCnTPCv7cVlH43VDA--.32656S2; Fri, 09 Feb 2024 17:17:36 +0800 (CST) From: Keqi Wang <wangkeqi_chris@163.com> To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Keqi Wang <wangkeqi_chris@163.com>, kernel test robot <oliver.sang@intel.com> Subject: [PATCH] connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared" Date: Fri, 9 Feb 2024 17:16:59 +0800 Message-Id: <20240209091659.68723-1-wangkeqi_chris@163.com> X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wCnTPCv7cVlH43VDA--.32656S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7ur13Ar15Ar4UKry8CryDWrg_yoW8Gw4DpF ZrZFy5AFW8t3WfXws8A3ZrZFy5Xas5Xr1UuFWIkw1kZF45WrWkJa1rtFZIgF9xAr1kKr1j qa17JFZxZFWDZ3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pEv38UUUUUU= X-CM-SenderInfo: 5zdqwy5htlsupkul2qqrwthudrp/1tbiQBJ-3GVOBbgGJAAAsF X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790413234865543055 X-GMAIL-MSGID: 1790413234865543055 |
Series |
connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared"
|
|
Commit Message
Keqi Wang
Feb. 9, 2024, 9:16 a.m. UTC
This reverts commit c46bfba1337d ("connector: Fix proc_event_num_listeners
count not cleared").
It is not accurate to reset proc_event_num_listeners according to
cn_netlink_send_mult() return value -ESRCH.
In the case of stress-ng netlink-proc, -ESRCH will always be returned,
because netlink_broadcast_filtered will return -ESRCH,
which may cause stress-ng netlink-proc performance degradation.
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202401112259.b23a1567-oliver.sang@intel.com
Fixes: c46bfba1337d ("connector: Fix proc_event_num_listeners count not cleared")
Signed-off-by: Keqi Wang <wangkeqi_chris@163.com>
---
drivers/connector/cn_proc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Comments
Hello: This patch was applied to netdev/net.git (main) by Paolo Abeni <pabeni@redhat.com>: On Fri, 9 Feb 2024 17:16:59 +0800 you wrote: > This reverts commit c46bfba1337d ("connector: Fix proc_event_num_listeners > count not cleared"). > > It is not accurate to reset proc_event_num_listeners according to > cn_netlink_send_mult() return value -ESRCH. > > In the case of stress-ng netlink-proc, -ESRCH will always be returned, > because netlink_broadcast_filtered will return -ESRCH, > which may cause stress-ng netlink-proc performance degradation. > > [...] Here is the summary with links: - connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared" https://git.kernel.org/netdev/net/c/8929f95b2b58 You are awesome, thank you!
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c index 3d5e6d705fc6..44b19e696176 100644 --- a/drivers/connector/cn_proc.c +++ b/drivers/connector/cn_proc.c @@ -108,9 +108,8 @@ static inline void send_msg(struct cn_msg *msg) filter_data[1] = 0; } - if (cn_netlink_send_mult(msg, msg->len, 0, CN_IDX_PROC, GFP_NOWAIT, - cn_filter, (void *)filter_data) == -ESRCH) - atomic_set(&proc_event_num_listeners, 0); + cn_netlink_send_mult(msg, msg->len, 0, CN_IDX_PROC, GFP_NOWAIT, + cn_filter, (void *)filter_data); local_unlock(&local_event.lock); }