From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <harry.van.haaren@intel.com>
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by dpdk.org (Postfix) with ESMTP id DB0432C18
 for <dev@dpdk.org>; Wed, 28 Mar 2018 10:22:44 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga005.fm.intel.com ([10.253.24.32])
 by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 28 Mar 2018 01:22:43 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.48,370,1517904000"; d="scan'208";a="215547138"
Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23])
 by fmsmga005.fm.intel.com with ESMTP; 28 Mar 2018 01:22:42 -0700
Received: from irsmsx101.ger.corp.intel.com ([169.254.1.176]) by
 IRSMSX109.ger.corp.intel.com ([169.254.13.170]) with mapi id 14.03.0319.002;
 Wed, 28 Mar 2018 09:22:41 +0100
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>, "Tan, Jianfeng"
 <jianfeng.tan@intel.com>
CC: "Burakov, Anatoly" <anatoly.burakov@intel.com>, "dev@dpdk.org"
 <dev@dpdk.org>, "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Thread-Topic: [dpdk-dev] [PATCH v6 2/2] eal: add asynchronous request API to
 DPDK IPC
Thread-Index: AQHTxel7DHKbmMO08ke0/uE2vr7zt6Pk1t0AgABZl4CAABvcYA==
Date: Wed, 28 Mar 2018 08:22:41 +0000
Message-ID: <E923DB57A917B54B9182A2E928D00FA65E018297@IRSMSX101.ger.corp.intel.com>
References: <cde1ac06bc0f7e6193df6582d8b8a3b62fe51d09.1522159146.git.anatoly.burakov@intel.com>
 <3396888.LEadjR7LpM@xps>
 <ED26CBA2FAD1BF48A8719AEF02201E36514A9BC0@SHSMSX103.ccr.corp.intel.com>
 <2563064.olffpIeeN1@xps>
In-Reply-To: <2563064.olffpIeeN1@xps>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjNjMmIwN2QtM2E3OS00Y2Q2LTkzZGYtNmU0Y2FmOGRhMjliIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJ6dzRhNVRpN0hGQ0tOZWRvZVozS0RvTnN1MStCOHdHbDF6NlBnV1kwek9KZHd1RDlud0FqYVNUMmdaWlc0UXVUIn0=
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 v6 2/2] eal: add asynchronous request API to
 DPDK IPC
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Mar 2018 08:22:45 -0000

> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Wednesday, March 28, 2018 8:30 AM
> To: Tan, Jianfeng <jianfeng.tan@intel.com>
> Cc: Burakov, Anatoly <anatoly.burakov@intel.com>; dev@dpdk.org; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>; Van Haaren, Harry
> <harry.van.haaren@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v6 2/2] eal: add asynchronous request API =
to
> DPDK IPC
>=20
> 28/03/2018 04:08, Tan, Jianfeng:
> > Hi Thomas ,
> >
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > 27/03/2018 15:59, Anatoly Burakov:
> > > > Under the hood, we create a separate thread to deal with replies to
> > > > asynchronous requests, that will just wait to be notified by the
> > > > main thread, or woken up on a timer.
> > >
> > > I really don't like that a library is creating a thread.
> > > We don't even know where the thread is created (which core).
> > > Can it be a rte_service? or in the interrupt thread?
> >
> > Agree that we'd better not adding so many threads in a library.
> >
> > I was considering to merge all the threads into the interrupt thread,
> however, we don't have an interrupt thread in freebsd. Further, we don't
> implement alarm API in freebsd. That's why I tend to current implementati=
on,
> and optimize it later.
>=20
> I would prefer we improve the current code now instead of polluting more
> with more uncontrolled threads.
>=20
> > For rte_service, it may be not a good idea to reply on it as it needs
> explicit API calls to setup.
>=20
> I don't see the issue of the explicit API.
> The IPC is a new service.

Although I do like to see new services, if we want to enable "core" dpdk fu=
nctionality with Services, we need a proper designed solution for that. Ser=
vice cores is not intended for "occasional" work - there is no method to bl=
ock and sleep on a specific service until work becomes available, so this w=
ould imply a busy-polling. Using a service (hence busy polling) for rte_mal=
loc()-based memory mapping requests is inefficient, and total overkill :)

For this patch I suggest to use some blocking-read capable mechanism.

The above said, in the longer term it would be good to have a design that a=
llows new file-descriptors to be added to a "dpdk core" thread, which perfo=
rms occasional lengthy work if the FD has data available.