From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 3A370FFA for ; Mon, 6 Feb 2017 19:41:33 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP; 06 Feb 2017 10:41:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,342,1477983600"; d="scan'208";a="62500179" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga006.fm.intel.com with ESMTP; 06 Feb 2017 10:41:29 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.38]) by IRSMSX102.ger.corp.intel.com ([169.254.2.230]) with mapi id 14.03.0248.002; Mon, 6 Feb 2017 18:41:28 +0000 From: "Ananyev, Konstantin" To: Olivier Matz , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC 0/8] mbuf: structure reorganization Thread-Index: AQHSdlXOvL8VQlbyOU+/T85mDKip26FcYNGA Date: Mon, 6 Feb 2017 18:41:27 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772583F111A29@irsmsx105.ger.corp.intel.com> References: <1485271173-13408-1-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1485271173-13408-1-git-send-email-olivier.matz@6wind.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC 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: Mon, 06 Feb 2017 18:41:34 -0000 Hi Olivier, Looks good in general, some comments from me below. Thanks Konstantin >=20 > 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 Wonder why it deserves to be in first cache line? How it differs from seqn below (pure SW stuff right now). > - 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 Not that I am completely against it, but changing nb_segs to 16 bits seems like an overkill to me. I think we can keep and extra 8bits for something more useful in future. > - move seqn in the 2nd cache line >=20 > 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 I wonder can refcnt only be moved into the 2-nd cacheline? As I understand thanks to other change (from above) m->refcnt=20 will already be initialized, so RX code don't need to touch it. Though yes, it still would require changes in all PMDs. > it would require to change all the drivers, which is not an easy task. > - remove the m->port field: too much impact on many examples and librarie= s, > and some people highlighted they are using it. Ok, but can it be moved into the second cache-line? > - moving m->next in the 1st cache line: there is not enough room, and hav= ing > it set to NULL for unused mbuf should remove the need for it. > - merge seqn and timestamp together in a union: we could imagine use case= s > were both are activated. There is no flag indicating the presence of se= qn, > so it looks preferable to keep them separated for now. >=20 > I made some basic performance tests (ixgbe) and see no regression, but > the patchset requires more testing. >=20 > [1] http://dpdk.org/ml/archives/dev/2016-October/049338.html >=20