Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755578AbdIFQsu (ORCPT ); Wed, 6 Sep 2017 12:48:50 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:42586 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753966AbdIFQss (ORCPT ); Wed, 6 Sep 2017 12:48:48 -0400 Subject: Re: [PATCH net v2] 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: <20170906163551.20387-1-Haakon.Bugge@oracle.com> From: Santosh Shilimkar Organization: Oracle Corporation Message-ID: <8260b33b-504b-8b7e-44d0-b8699f33ab74@oracle.com> Date: Wed, 6 Sep 2017 09:48:46 -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: <20170906163551.20387-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: 679 Lines: 19 On 9/6/2017 9:35 AM, Håkon Bugge wrote: > In rds_send_xmit() there is logic to batch the sends. However, if > another thread has acquired the lock and has incremented the send_gen, > 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 counts the race condition correctly. > > Changes from v1: > - Removed check for *someone_on_xmit()* > - Fixed incorrect indentation > > Signed-off-by: Håkon Bugge > Reviewed-by: Knut Omang > --- Thanks for the update. Acked-by: Santosh Shilimkar