On Thu, Jan 22, 2015 at 02:34:07PM +0000, Ananyev, Konstantin wrote: > Hi Bruce, > > > -----Original Message----- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson > > Sent: Thursday, January 22, 2015 12:19 PM > > To: Liang, Cunming > > Cc: dev at dpdk.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