From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) by dpdk.org (Postfix) with ESMTP id 6D3862B84 for ; Wed, 5 Apr 2017 11:50:13 +0200 (CEST) Received: by mail-wr0-f179.google.com with SMTP id t20so5901416wra.1 for ; Wed, 05 Apr 2017 02:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q3v36Zt0HtKHucCuQd29DKBFhzzppSJ23fqNUYAInG8=; b=0VPUYmTaGyYztdY5++E4i7JEZGk0q3Be/z2xzv/Z5oNGQt5z/SLOXgXCDQ1FxZg0v2 G6ZgWLdI3DY2Xz14p3IHGyeR4AXRt8OM4L/3C9Ux6udQ1Yoog2uorUSGtMn0lCY8pf/R aDSS9ztb22gKDFPjZdcchy2ZpzMiwNSXANgsBYoJpeQIj3r/m2lIY18SqyJZRLfFYgLN 7xBPtllKsWrlB3CPg1gr5JJcOC63owEldGj+KiSGfTKtuORqHbQ5eUVY0M/4U4i0A4p0 mgKty2tx235SUuyPzXCOHnN1YwdaEChCz1/b6YlSfTLPE8zA42cgkMaiV18szgRj1u/U n/hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q3v36Zt0HtKHucCuQd29DKBFhzzppSJ23fqNUYAInG8=; b=BKTCPd4HOlT+bG1vdMx3KKb8iyg9CbVYJoWlKLT+fgMWFDd8F3tLrVFT5RBubAJ71e G4GVCbG7SuDD6u+ADQNGlzNNuu5s/CrVOQNfjfVeMQxTurkXg7cy1m7zivcC3/EO4G6t 2lwDyJfwKfEVF1l6cN/Dhx2EPX3fQMO5BFl9O+UhVZyXfnMcyTvNquPhorF9NycsE9cx ELOhS8tu1VuQ6xSE+e7CN5UKYDhS/MZUf25MNaX+ndTCuKF05sJp69ntX2pHI9aYCJ93 JhgnV0qxgjDwggTkxcaS6QglW11Kif+hPzLFbK5iUf1anfWqEpQVYyU/nEwbLhHJHFL4 zsOA== X-Gm-Message-State: AFeK/H2YgEsDtXoIPqfX1tLMuO2sMQjfvfYG6wNs66HI9hsc5YJiz4WtkkBB0aikEUhE9l4F X-Received: by 10.223.150.35 with SMTP id b32mr1446294wra.78.1491385812967; Wed, 05 Apr 2017 02:50:12 -0700 (PDT) Received: from glumotte.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id u66sm21684235wmd.24.2017.04.05.02.50.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Apr 2017 02:50:12 -0700 (PDT) Date: Wed, 5 Apr 2017 11:46:08 +0200 From: Olivier MATZ To: Thomas Monjalon Cc: dev@dpdk.org, konstantin.ananyev@intel.com, bruce.richardson@intel.com, mb@smartsharesystems.com, andrey.chilikin@intel.com, jblunck@infradead.org, nelio.laranjeiro@6wind.com, arybchenko@solarflare.com, jerin.jacob@caviumnetworks.com Message-ID: <20170405114608.02354f7a@glumotte.dev.6wind.com> In-Reply-To: <2948467.vjfs1XSdfO@xps13> References: <1488966121-22853-1-git-send-email-olivier.matz@6wind.com> <20170404162807.20157-1-olivier.matz@6wind.com> <2948467.vjfs1XSdfO@xps13> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 0/8] mbuf: structure reorganization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 09:50:13 -0000 On Wed, 05 Apr 2017 11:37:39 +0200, Thomas Monjalon wrote: > 2017-04-04 18:27, Olivier Matz: > > Based on discussions done in [1] and in this thread, this patchset reorganizes > > the mbuf. > > > > The main changes are: > > - reorder structure to increase vector performance on some non-ia > > platforms. > > - add a 64bits timestamp field in the 1st cache line. This timestamp > > is not normalized, i.e. no unit or time reference is enforced. A > > library may be added to do this job in the future. > > - m->next, m->nb_segs, and m->refcnt are always initialized for mbufs > > in the pool, avoiding the need of setting m->next (located in the > > 2nd cache line) in the Rx path for mono-segment packets. > > - change port and nb_segs to 16 bits > > - move seqn in the 2nd cache line > > Applied, thanks for the long work > > We need to add a patch to bump ABIVER and document the changes. Thanks Thomas. I'm on it, I will send it ASAP. > > Things discussed but not done in the patchset: > > - move refcnt and nb_segs to the 2nd cache line: many drivers sets > > them in the Rx path, so it could introduce a performance regression, or > > it would require to change all the drivers, which is not an easy task. > > If it is worth to move these fields in 2nd cache line, > can we plan to rework drivers for not setting them in Rx? I think it's worth doing the driver modification, it may gain some cycles. Once it's done, it becomes easy to see the impact of moving the fields... except if it breaks a vector code ;) I think this move should only occur if we need more room in the first cache line. > > > Once this patchset is pushed, the Rx path of drivers could be optimized a bit, > > by removing writes to m->next, m->nb_segs and m->refcnt. The patch 4/8 gives an > > idea of what could be done. > > Yes drivers patches are welcome :) > Please target RC2 for these changes. >