From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH v1 02/15] eal: new eal option '--lcores' for cpu assignment Date: Thu, 22 Jan 2015 15:23:50 +0000 Message-ID: <20150122152350.GG4580@bricha3-MOBL3> References: <1417589628-43666-1-git-send-email-cunming.liang@intel.com> <1421914598-2747-1-git-send-email-cunming.liang@intel.com> <1421914598-2747-3-git-send-email-cunming.liang@intel.com> <20150122121921.GD4580@bricha3-MOBL3> <2601191342CEEE43887BDE71AB977258213DEF7B@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev-VfR2kkLFssw@public.gmane.org" To: "Ananyev, Konstantin" Return-path: Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB977258213DEF7B-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Thu, Jan 22, 2015 at 02:34:07PM +0000, Ananyev, Konstantin wrote: > Hi Bruce, > > > -----Original Message----- > > From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Bruce Richardson > > Sent: Thursday, January 22, 2015 12:19 PM > > To: Liang, Cunming > > Cc: dev-VfR2kkLFssw@public.gmane.org > > Subject: Re: [dpdk-dev] [PATCH v1 02/15] eal: new eal option '--lcores' for cpu assignment > > > > On Thu, Jan 22, 2015 at 04:16:25PM +0800, Cunming Liang wrote: > > > It supports one new eal long option '--lcores' for EAL thread cpuset assignment. > > > > > > The format pattern: > > > --lcores='lcores[@cpus]<,lcores[@cpus]>' > > > lcores, cpus could be a single digit or a group. > > > '(' and ')' are necessary if it's a group. > > > If not supply '@cpus', the value of cpus uses the same as lcores. > > > > > > e.g. '1,2@(5-7),(3-5)@(0,2),(0,6)' means starting 7 EAL thread as below > > > lcore 0 runs on cpuset 0x41 (cpu 0,6) > > > lcore 1 runs on cpuset 0x2 (cpu 1) > > > lcore 2 runs on cpuset 0xe0 (cpu 5,6,7) > > > lcore 3,4,5 runs on cpuset 0x5 (cpu 0,2) > > > lcore 6 runs on cpuset 0x41 (cpu 0,6) > > > > > > > This strikes me as very confusing, though a couple of tweaks might help with > > readability. The lcore 0 at the end is especially confusing. > > Didn't get you here: do you find (0,6) confusing, right? > Because braces implicitly specifies affinity for group of en-braced lcores? > > > Perhaps we can > > limit the allowed formats here, > > * require the lcore_id to be specified - the lack of an lcore id for the last part > > makes having it as lcore 0 surprising. > > Again, not sure I understand you properly: lcore_id(s) are always specified explicitly. > Physical cpus part might be omitted. > > > * only allow one lcore id to be given for each set of cores. > > So you mean for '(3-5)@(0,2)' user would have to: '3@(0,2),4@(0,2),5@(0,2)'? > I don't see big difference here, but imagine you'd like to create a pool of 32 EAL-threads running on same cpu set. > With current syntax it is just something like: '(32-63)@(0-7)'. > With what you proposing it will be a very long list. > > > > > I think it may still be readable if we allow the core set to be omitted if its > > to be the same as the lcore_id. > > I think that is supported. > See lcore_id=1 in Steve's example above. > As I understand: --lcores='0,2,3-5' is equal to '-l 0,2,3-5' and to '-c 0x3d'. > > Konstantin Ok, thanks for the clarification. /Bruce