lkml.org 
[lkml]   [2016]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3] lib/bitmap.c: enhance bitmap syntax
Date
> From: Pan Xinhui [mailto:xinhui@linux.vnet.ibm.com] 
> Sent: Sunday, July 17, 2016 4:59 PM

>>
>> I really think it is better to implement one function to generic a string which contanis the cpus you want to boot on, then pass this string to __bitmap_parselist.
>>
> sorry, typos.
> generic -> generate.

Please explain how this will solve the syntax issue Ben commented on?

Another syntax which might be simpler is:
<first cpu-last cpu>:<numcpus selected from group>/<cpus group size>
e.g.
0-1023:1/2 <==> 0,2,4,...,1022
1-1023:1/2 <==> 1,3,5,...,1023

So basically no need for modulo only divide the list into groups of cpus and for each group choose cpus from group start.
It is basically achieves same and hopefully more simpler and more eligible for such generic code.

Please let me know what you think?
Is it good direction to change the syntax, or that I should turn into different approach (like Pan suggested)?

Noam.

\
 
 \ /
  Last update: 2016-07-18 10:21    [W:0.103 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site