From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A5839AAF5 for ; Tue, 3 Apr 2018 14:47:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2018 05:47:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,401,1517904000"; d="scan'208";a="188272407" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga004.jf.intel.com with ESMTP; 03 Apr 2018 05:47:56 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.176]) by irsmsx110.ger.corp.intel.com ([169.254.15.211]) with mapi id 14.03.0319.002; Tue, 3 Apr 2018 13:47:55 +0100 From: "Van Haaren, Harry" To: "Varghese, Vipin" , "dev@dpdk.org" Thread-Topic: [PATCH 1/2] event/sw: code refractor to reduce the fetch stall Thread-Index: AQHTsWSsjYR9+B44jUqQlepWieZ/YaPvMGHQ Date: Tue, 3 Apr 2018 12:47:55 +0000 Message-ID: References: <1519932900-10571-1-git-send-email-vipin.varghese@intel.com> In-Reply-To: <1519932900-10571-1-git-send-email-vipin.varghese@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjNkNzA0MDQtODk4ZC00YzU0LWFiMDMtNjYwZmVlZmViZDM0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJ3ME1POStneWZHdDU2OXhzbTJPVmw4XC90OGMyYk1KVHZcL0UyXC90QlBYMjlkeGd4XC9vaUNiVG1ETk9TbGZPWk9BeSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] event/sw: code refractor to reduce the fetch stall 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: Tue, 03 Apr 2018 12:47:59 -0000 Hey, > -----Original Message----- > From: Varghese, Vipin > Sent: Thursday, March 1, 2018 7:35 PM > To: dev@dpdk.org; Van Haaren, Harry > Cc: Varghese, Vipin > Subject: [PATCH 1/2] event/sw: code refractor to reduce the fetch stall >=20 > With rearranging the code to prefetch the contents before > loop check increases performance from single and multistage > atomic pipeline. >=20 > Signed-off-by: Vipin Varghese There seems to be a compilation issue with this, see "const" in flow_id. The flow_id variable is updated later, so it can't be marked const. After the compilation fix, I see a small performance improvement here, so you can include my Ack for V2 of this patch: Acked-by: Harry van Haaren --- > drivers/event/sw/sw_evdev_scheduler.c | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/event/sw/sw_evdev_scheduler.c > b/drivers/event/sw/sw_evdev_scheduler.c > index e3a41e0..70d1970 100644 > --- a/drivers/event/sw/sw_evdev_scheduler.c > +++ b/drivers/event/sw/sw_evdev_scheduler.c > @@ -44,12 +44,13 @@ sw_schedule_atomic_to_cq(struct sw_evdev *sw, struct > sw_qid * const qid, > uint32_t qid_id =3D qid->id; >=20 > iq_dequeue_burst(sw, &qid->iq[iq_num], qes, count); > - for (i =3D 0; i < count; i++) { > - const struct rte_event *qe =3D &qes[i]; > - const uint16_t flow_id =3D SW_HASH_FLOWID(qes[i].flow_id); > - struct sw_fid_t *fid =3D &qid->fids[flow_id]; > - int cq =3D fid->cq; >=20 > + const struct rte_event *qe =3D &qes[0]; > + const uint16_t flow_id =3D SW_HASH_FLOWID(qes[0].flow_id); ^^^^^^ remove the const here.