linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Noam Camus <noamca@mellanox.com>
To: Pan Xinhui <xinhui@linux.vnet.ibm.com>,
	"decot@googlers.com" <decot@googlers.com>
Cc: "ben@decadent.org.uk" <ben@decadent.org.uk>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3] lib/bitmap.c: enhance bitmap syntax
Date: Mon, 18 Jul 2016 07:06:16 +0000	[thread overview]
Message-ID: <AM4PR0501MB2322FCCB9151D3047C46BC93AA360@AM4PR0501MB2322.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <06d3f797-2de6-42a2-c356-db086e14836c@linux.vnet.ibm.com>

> 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.

  reply	other threads:[~2016-07-18  7:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-16  7:57 [PATCH] lib/bitmap.c: enhance map pattern Noam Camus
2016-07-16 12:09 ` Ben Hutchings
2016-07-17  6:33 ` [PATCH v2] lib/bitmap.c: enhance bitmap syntax Noam Camus
2016-07-17  8:10   ` [PATCH v3] " Noam Camus
2016-07-17 13:50     ` Pan Xinhui
2016-07-17 13:59       ` Pan Xinhui
2016-07-18  7:06         ` Noam Camus [this message]
2016-08-01  4:53           ` Noam Camus
2016-09-06  9:12           ` Noam Camus
2016-09-06 13:36             ` Ben Hutchings
2016-09-08 15:33     ` [PATCH v4] " Noam Camus
2016-09-08 22:19       ` Andrew Morton
2016-09-11  7:40       ` [PATCH v5] " Noam Camus
2016-09-13 22:54         ` Andrew Morton
2016-09-14  6:52           ` Noam Camus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM4PR0501MB2322FCCB9151D3047C46BC93AA360@AM4PR0501MB2322.eurprd05.prod.outlook.com \
    --to=noamca@mellanox.com \
    --cc=akpm@linux-foundation.org \
    --cc=ben@decadent.org.uk \
    --cc=davem@davemloft.net \
    --cc=decot@googlers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xinhui@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).