From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id 63C3A2931 for ; Fri, 2 Sep 2016 18:51:33 +0200 (CEST) Received: by mail-pf0-f180.google.com with SMTP id p64so44059174pfb.1 for ; Fri, 02 Sep 2016 09:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V/6gzf1+QXCaiDx+dhuV19/QkGmymOknk08Hwd0O3FI=; b=cYe6yIcLMKmrgQNut1fDQqzhn4UyUQ7tveTq2MHMx6RaKDZRf/you4U3eGCDWswN2e 7gZ42/Kr3xB5yI7vLTzLExY9N9n/804vZQoJRahU3RxEE2jWLjIFHQfaIJ0c6EDngusw EsEpWN66TGbfj7enOi6Q9arAntNchFODSSjsf5YZNJGpTvrdvTL3ke6PUN0vJFRXa1/Z +SuYBo7XLM6CsbPTM91kAIg/9rCadB4Mg9+tsXZFxfk6fSLBQYtEL4exAAqRRvHlX72m kLHBxpkA4lGbmX9VEZ5XYO4WOP0I4nuJyrfhBo02RKQGXFzEagkVAloi0gF6X0D9yDhi s7Ig== 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-transfer-encoding; bh=V/6gzf1+QXCaiDx+dhuV19/QkGmymOknk08Hwd0O3FI=; b=OFNMwl0VczlV2A6M1aV3gfsi8RCOsdz8POOjHGf2VhKAbhdncHP8i2UnoypNl8LXxZ zp3Y+Gpa7SJ8loeIjaKvimAzItlUCSs0aOa5vlc9epqRMK/RBtbRm+8uvujjJ6IktWDM /AUp3YxnqNLtvjcJZ5EDeixzmOO9vPb7yk2Nucg//49MczsCXQVmD7jSsGxfk8XTMiYA aQ7pFk9FpD3i+8SCmoLfxIrW7B3rG1c4D+FYg0llP4oCnc0DRMSpMtxJeqKM5PJ2vkLJ XvruVA0eYJfTapVNOCP75IgGObdUPocKkO3oYXKUTMx1T/zFCadFGqsER1BNv3f0XyOS 5jxg== X-Gm-Message-State: AE9vXwO8CYvpig5SkWfLTZROcqehDG346eT+C1nu9pggTgCUuR+PfXxXDQNVMzCxq0z5dw== X-Received: by 10.98.35.7 with SMTP id j7mr38080640pfj.39.1472835092762; Fri, 02 Sep 2016 09:51:32 -0700 (PDT) Received: from xeon-e3 (static-50-53-69-251.bvtn.or.frontiernet.net. [50.53.69.251]) by smtp.gmail.com with ESMTPSA id 75sm16042640pfw.92.2016.09.02.09.51.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Sep 2016 09:51:32 -0700 (PDT) Date: Fri, 2 Sep 2016 09:51:43 -0700 From: Stephen Hemminger To: Linzhe Lee Cc: dev@dpdk.org Message-ID: <20160902095143.117482f0@xeon-e3> In-Reply-To: References: <1472793906-5699-1-git-send-email-slayercat.subscription@gmail.com> <20160902091236.57250d1a@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] mbuf: fix atomic refcnt update synchronization 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: Fri, 02 Sep 2016 16:51:33 -0000 On Sat, 3 Sep 2016 00:31:50 +0800 Linzhe Lee wrote: > Thanks for reply, Stephen. > > > > I'm in x86-64, my cpu is `Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz`. > > > > When allocation mbuf in program1, and transfer it to program2 for free > via ring, the program1 might meet assert in allocate mbuf sometimes. > (`RTE_ASSERT(rte_mbuf_refcnt_read(m) == 0);`) > > > > but when I using gdb to check it, the refcnt field of mbuf is already > zero. so I believe the problem came from the cache line problem or > incorrect optimization. > > > > When apply this patch, the problem seems solved. I'm submitting it for > your comments. Are you sure you have REFCNT_ATOMIC set?