From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by dpdk.org (Postfix) with ESMTP id 0C4FF5A8C for ; Mon, 30 Mar 2015 20:15:02 +0200 (CEST) Received: by pdnc3 with SMTP id c3so183372116pdn.0 for ; Mon, 30 Mar 2015 11:15:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=6BYjO1PsuSKIUMK5H33HTVqiRg2ZtGeOSumsNgEQNtc=; b=dCDg5fHnAB1BJHMgHq9IXTP3o4kmXwFOErw/6Zd3CUYUYerGtEvXW2uNXD9frmFj5q AYLAoNkCsLCh7D1xksz2VFTnR2/MagBW0zj0S/KmtpVmpITYB3PPswA3npcyOuYTyLjE QVWsv0kyjGnAzIjRoMOabemho1M7zbmFldBe7mHWqz9v4pR6N2pTYoDxLoMPDojb7ds4 c8x0nxCSjOY84PxvA1SmBLc6RJvhJllhfSGGWockIHOJRrfiPkB6x2fqahHC2ouShMTQ cxjqHgrwE/6aBdERKLlG7c3l8lTKumcXoE+n22ucsVykR8ArBN0jML8oUD5Vw0odmZOI DSMg== X-Gm-Message-State: ALoCoQnR9tQOgMcgQO7Ugzc0DN7KWSLYeIIkWDTGgC+y/Dbcl9mg2JZuej0Olayzf08+vKrVF2hJ X-Received: by 10.66.156.7 with SMTP id wa7mr7441926pab.99.1427739301378; Mon, 30 Mar 2015 11:15:01 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id gy1sm9170117pbc.55.2015.03.30.11.15.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Mar 2015 11:15:00 -0700 (PDT) Date: Mon, 30 Mar 2015 11:15:05 -0700 From: Stephen Hemminger To: Don Provan Message-ID: <20150330111505.6f1b6f4b@urahara> In-Reply-To: References: <1427404494-27256-1-git-send-email-bruce.richardson@intel.com> <20150327102956.GB5375@hmsreliant.think-freely.org> <20150327113238.GA11660@bricha3-MOBL3> <20150327140735.GG5375@hmsreliant.think-freely.org> <20150327143049.GB9972@bricha3-MOBL3> <20150327143841.GH5375@hmsreliant.think-freely.org> <20150327145526.GA10332@bricha3-MOBL3> <20150327164358.GI5375@hmsreliant.think-freely.org> <59AF69C657FD0841A61C55336867B5B0344F112F@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] mbuf: add comment explaining confusing code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2015 18:15:02 -0000 On Mon, 30 Mar 2015 17:39:06 +0000 Don Provan wrote: > In all the debate about atomics, I don't think anyone got around to pointing out that in the unlikely case that the refcnt is not 1, then it's equally unlikely that decrementing it will result in 0 despite the code's claim to the contrary. That's the part that confused me. Would it make sense to fix this while adding the comment? Really doubt the second likely() makes any difference in code speed. Should probably just be removed.