From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 45030AAF5 for ; Tue, 3 Apr 2018 14:50:28 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2018 05:50:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,401,1517904000"; d="scan'208";a="217133393" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga006.fm.intel.com with ESMTP; 03 Apr 2018 05:50:26 -0700 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 3 Apr 2018 13:50:25 +0100 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.176]) by irsmsx112.ger.corp.intel.com ([169.254.1.226]) with mapi id 14.03.0319.002; Tue, 3 Apr 2018 13:50:25 +0100 From: "Van Haaren, Harry" To: "Varghese, Vipin" , "dev@dpdk.org" Thread-Topic: [PATCH 2/2] event/sw: code refractor for sw_refill_pp_buf Thread-Index: AQHTsWSwbPXbPMNB5EmHM4tqjHET5KPvMTpA Date: Tue, 3 Apr 2018 12:50:24 +0000 Message-ID: References: <1519932900-10571-1-git-send-email-vipin.varghese@intel.com> <1519932900-10571-2-git-send-email-vipin.varghese@intel.com> In-Reply-To: <1519932900-10571-2-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWJjM2NhM2YtMTU3ZS00ZTRmLWI5NGYtMGM0ODIxNTNjYjUwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJxbFQwUDdpMWpqVXFWQjgyaUxkZ3hyMW1md3B0bDNZaUg1NFVuYmcyMTZQWUZ3a0d1bk53ZDVqQ2VZZ3ZmM3A5In0= 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 2/2] event/sw: code refractor for sw_refill_pp_buf 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:50:28 -0000 > -----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 2/2] event/sw: code refractor for sw_refill_pp_buf >=20 > Code changes how shadow buffer are filled up in each calls. > Refilling the shadow buffer helped in improving 0.2 Mpps. >=20 > Signed-off-by: Vipin Varghese > --- > drivers/event/sw/sw_evdev_scheduler.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/drivers/event/sw/sw_evdev_scheduler.c > b/drivers/event/sw/sw_evdev_scheduler.c > index 70d1970..a95a22a 100644 > --- a/drivers/event/sw/sw_evdev_scheduler.c > +++ b/drivers/event/sw/sw_evdev_scheduler.c > @@ -451,6 +451,10 @@ __pull_port_lb(struct sw_evdev *sw, uint32_t port_id= , int > allow_reorder) > port->pp_buf_count--; > } /* while (avail_qes) */ >=20 > + /* replensih buffers before next iteration */ > + if (port->pp_buf_count =3D=3D 0) > + sw_refill_pp_buf(sw, port); > + > return pkts_iter; > } I see the goal here - to ensure that the port buffer has items when we next enter this function, possibly reducing a stall waiting for the ring access. In theory this is a good idea - in practice, I see a small performance degr= adation. Hence, I suggest we drop this patch from the patchset, and merge 1/2 alone.