Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755190AbdIFP6P (ORCPT ); Wed, 6 Sep 2017 11:58:15 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:40267 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754372AbdIFP6N (ORCPT ); Wed, 6 Sep 2017 11:58:13 -0400 Subject: Re: [PATCH net] rds: Fix incorrect statistics counting To: =?UTF-8?Q?H=c3=a5kon_Bugge?= , "David S . Miller" Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-kernel@vger.kernel.org, knut.omang@oracle.com References: <20170906152950.17766-1-Haakon.Bugge@oracle.com> From: Santosh Shilimkar Organization: Oracle Corporation Message-ID: Date: Wed, 6 Sep 2017 08:58:16 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170906152950.17766-1-Haakon.Bugge@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 937 Lines: 24 On 9/6/2017 8:29 AM, Håkon Bugge wrote: > In rds_send_xmit() there is logic to batch the sends. However, if > another thread has acquired the lock, it is considered a race and we > yield. The code incrementing the s_send_lock_queue_raced statistics > counter did not count this event correctly. > > This commit removes a small race in determining the race and > increments the statistics counter correctly. > > Signed-off-by: Håkon Bugge > Reviewed-by: Knut Omang > --- > net/rds/send.c | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > Those counters are not really to give that accurate so am not very keen to add additional cycles in send paths and add additional code. Have you seen any real issue or this is just a observation. s_send_lock_queue_raced counter is never used to check for smaller increments and hence the question. Regards, Santosh