Re: [Xen-devel] [RFC PATCH v3 2/2] xen: credit2: provide custom option to create

2017-04-14 Thread Praveen Kumar
On Fri, Mar 31, 2017 at 10:32:09AM +0200, Dario Faggioli wrote: > On Fri, 2017-03-31 at 00:58 +0530, Praveen Kumar wrote: > > The patch introduces a new command line option 'custom' that when > used will > > create runqueue based upon the pCPU subset provide during

[Xen-devel] [RFC PATCH v4] xen: credit2: provide custom option to create runqueue

2017-04-19 Thread Praveen Kumar
The patch introduces a new, very flexible way of arranging runqueues in Credit2. It allows to specify, explicitly and precisely, what pCPUs should belong to which runqueue. Signed-off-by: Praveen Kumar --- docs/misc/xen-command-line.markdown | 10 ++- xen/common/sched_credit2.c | 167

[Xen-devel] [PATCH] xen: common: rtree: ported updates from linux tree

2017-05-10 Thread Praveen Kumar
Hi All, The subject patch imports the changes and updates of the rbtree implementaiton from linux tree. But since, the only current implementation is with tmem.c, which I am not much aware of, and therefore, was unable to test the changes thoroughly. Having said that, I do have plans of adding

[Xen-devel] [PATCH] xen: common: rtree: ported updates from linux tree

2017-05-10 Thread Praveen Kumar
The patch contains the updated version of rbtree implementation from linux kernel tree containing the fixes so far handled. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c| 755 - xen/include/xen/compiler.h | 60 +++ xen/include

[Xen-devel] [resend PATCH] xen: common: rbtree: ported updates from linux tree

2017-05-11 Thread Praveen Kumar
The patch contains the updated version of rbtree implementation from linux kernel tree containing the fixes so far handled. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c| 748 + xen/include/xen/compiler.h | 60 +++ xen/include

[Xen-devel] xl list command hangs

2017-05-11 Thread Praveen Kumar
Hi All, I am working with latest xen code base ( Unstable branch ). Tried with no changes / commit from my end, and was facing the hang issue while running xl list command. I tried doing make world and installing the packages, but still the problem persists. There we not any specific logs in xl dm

Re: [Xen-devel] xl list command hangs

2017-05-12 Thread Praveen Kumar
No, xenstored was not running. Instantiating the same resolved the issue. Thanks Roger for your guidance. On Fri, May 12, 2017 at 1:43 PM, Roger Pau Monné wrote: > On Thu, May 11, 2017 at 11:53:43PM +0530, Praveen Kumar wrote: > > Hi All, > > > > I am working with

Re: [Xen-devel] [resend PATCH] xen: common: rbtree: ported updates from linux tree

2017-05-23 Thread Praveen Kumar
or this thing that Praveen is trying to do, > to > be a series, with one patch for each original Linux commit? I think, > if > it were me doing this, that would be how I'd do it. > > Otherwise it is e.g. hard to understand why ... > > > > > > > > > &

[Xen-devel] [PATCH 03/17] rb_tree: remove redundant if()-condition in rb_erase()

2017-05-31 Thread Praveen Kumar
Furthermore, notice that the initial checks: if (!node->rb_left) child = node->rb_right; else if (!node->rb_right) child = node->rb_left; else { ... } guarantee that old->rb_righ

[Xen-devel] [PATCH 02/17] rb_tree: make clear distinction between two different cases in rb_erase()

2017-05-31 Thread Praveen Kumar
There are two cases when a node, having 2 childs, is erased: 'normal case': the successor is not the right-hand-child of the node to be erased 'special case': the successor is the right-hand child of the node to be erased Here some ascii-art, with following symbols (referring to the code): O: node

[Xen-devel] [PATCH v2] xen: common: rbtree: ported updates from linux tree

2017-05-31 Thread Praveen Kumar
in advance. From Praveen Kumar # This line is ignored. From: Praveen Kumar Subject: In-Reply-To: ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH 05/17] rbtree: move some implementation details from rbtree.h to rbtree.c

2017-05-31 Thread Praveen Kumar
rbtree users must use the documented APIs to manipulate the tree structure. Low-level helpers to manipulate node colors and parenthood are not part of that API, so move them to lib/rbtree.c commit bf7ad8eeab995710c766df49c9c69a8592ca0216 from linux tree Signed-off-by: Michel Lespinasse Cc: Andr

[Xen-devel] [PATCH 04/17] rbtree: empty nodes have no color

2017-05-31 Thread Praveen Kumar
Empty nodes have no color. We can make use of this property to simplify the code emitted by the RB_EMPTY_NODE and RB_CLEAR_NODE macros. commit 4c199a93a2d36b277a9fd209a0f2793f8460a215 from linux tree. Signed-off-by: Michel Lespinasse Cc: Andrea Arcangeli Acked-by: David Woodhouse Cc: Rik van

[Xen-devel] [PATCH 06/17] rbtree: break out of rb_insert_color loop after tree rotation

2017-05-31 Thread Praveen Kumar
It is a well known property of rbtrees that insertion never requires more than two tree rotations. In our implementation, after one loop iteration identified one or two necessary tree rotations, we would iterate and look for more. However at that point the node's parent would always be black, whi

[Xen-devel] [PATCH 07/17] rbtree: adjust root color in rb_insert_color() only when necessary

2017-05-31 Thread Praveen Kumar
The root node of an rbtree must always be black. However, rb_insert_color() only needs to maintain this invariant when it has been broken - that is, when it exits the loop due to the current (red) node being the root. In all other cases (exiting after tree rotations, or exiting due to an existing

[Xen-devel] [PATCH 08/17] rbtree: low level optimizations in rb_insert_color()

2017-05-31 Thread Praveen Kumar
- Use the newly introduced rb_set_parent_color() function to flip the color of nodes whose parent is already known. - Optimize rb_parent() when the node is known to be red - there is no need to mask out the color in that case. - Flipping gparent's color to red requires us to fetch its rb_parent

[Xen-devel] [PATCH 01/17] rb_tree: reorganize code in rb_erase() for additional changes

2017-05-31 Thread Praveen Kumar
First, move some code around in order to make the next change more obvious. commit 16c047add3ceaf0ab882e3e094d1ec904d02312d from linux tree [a...@linux-foundation.org: coding-style fixes] Signed-off-by: Peter Zijlstra Signed-off-by: Wolfram Strepp Signed-off-by: Andrew Morton Signed-off-by: Li

[Xen-devel] [PATCH 09/17] rbtree: adjust node color in __rb_erase_color() only when necessary

2017-05-31 Thread Praveen Kumar
In __rb_erase_color(), we were always setting a node to black after exiting the main loop. And in one case, after fixing up the tree to satisfy all rbtree invariants, we were setting the current node to root just to guarantee a loop exit, at which point the root would be set to black. However thi

[Xen-devel] [PATCH 15/17] rbtree: handle 1-child recoloring in rb_erase() instead of rb_erase_color()

2017-05-31 Thread Praveen Kumar
An interesting observation for rb_erase() is that when a node has exactly one child, the node must be black and the child must be red. An interesting consequence is that removing such a node can be done by simply replacing it with its child and making the child black, which we can do efficiently in

[Xen-devel] [PATCH 11/17] rbtree: low level optimizations in __rb_erase_color()

2017-05-31 Thread Praveen Kumar
In __rb_erase_color(), we often already have pointers to the nodes being rotated and/or know what their colors must be, so we can generate more efficient code than the generic __rb_rotate_left() and __rb_rotate_right() functions. Also when the current node is red or when flipping the sibling's col

[Xen-devel] [PATCH 10/17] rbtree: optimize case selection logic in __rb_erase_color()

2017-05-31 Thread Praveen Kumar
In __rb_erase_color(), we have to select one of 3 cases depending on the color on the 'other' node children. If both children are black, we flip a few node colors and iterate. Otherwise, we do either one or two tree rotations, depending on the color of the 'other' child opposite to 'node', and th

[Xen-devel] [PATCH 13/17] rbtree: add __rb_change_child() helper function

2017-05-31 Thread Praveen Kumar
Add __rb_change_child() as an inline helper function to replace code that would otherwise be duplicated 4 times in the source. No changes to binary size or speed. commit 7abc704ae399fcb9c51ca200b0456f8a975a8011 from Linux tree Signed-off-by: Michel Lespinasse Reviewed-by: Rik van Riel Cc: Pete

[Xen-devel] [PATCH 14/17] rbtree: place easiest case first in rb_erase()

2017-05-31 Thread Praveen Kumar
In rb_erase, move the easy case (node to erase has no more than 1 child) first. I feel the code reads easier that way. commit 60670b8034d6e2ba860af79c9379b7788d09db73 from Linux tree Signed-off-by: Michel Lespinasse Reviewed-by: Rik van Riel Cc: Peter Zijlstra Cc: Andrea Arcangeli Cc: David W

[Xen-devel] [PATCH 12/17] rbtree: optimize fetching of sibling node

2017-05-31 Thread Praveen Kumar
When looking to fetch a node's sibling, we went through a sequence of: - check if node is the parent's left child - if it is, then fetch the parent's right child This can be replaced with: - fetch the parent's right child as an assumed sibling - check that node is NOT the fetched child This avoid

Re: [Xen-devel] [PATCH 15/17] rbtree: handle 1-child recoloring in rb_erase() instead of rb_erase_color()

2017-05-31 Thread Praveen Kumar
Hi All, Sorry, I mistakenly sent the patch to Linux kernel developers. Please ignore the series of patch sent by me. Will be re-sending the updated patch to respective maintainers. Sorry once again for spamming your mailbox. Regards, ~Praveen. On Thu, Jun 1, 2017 at 2:17 AM, Praveen Kumar

[Xen-devel] [Xen-devel[PATCH Resend v2] xen: common: rbtree: ported updates from linux tree

2017-05-31 Thread Praveen Kumar
in advance. From Praveen Kumar # This line is ignored. From: Praveen Kumar Subject: In-Reply-To: ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [Resend][PATCH 03/17] rb_tree: remove redundant if()-condition in rb_erase()

2017-05-31 Thread Praveen Kumar
tee that old->rb_right is set in the final else branch, therefore we can omit checking that again. commit 4b324126e0c6c3a5080ca3ec0981e8766ed6f1ee from linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/common

[Xen-devel] [Resend][PATCH 01/17] rb_tree: reorganize code in rb_erase() for additional changes

2017-05-31 Thread Praveen Kumar
First, move some code around in order to make the next change more obvious. commit 16c047add3ceaf0ab882e3e094d1ec904d02312d from linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/xen/common

[Xen-devel] [Resend][PATCH 05/17] rbtree: move some implementation details from rbtree.h to rbtree.c

2017-05-31 Thread Praveen Kumar
rbtree users must use the documented APIs to manipulate the tree structure. Low-level helpers to manipulate node colors and parenthood are not part of that API, so move them to lib/rbtree.c commit bf7ad8eeab995710c766df49c9c69a8592ca0216 from linux tree Signed-off-by: Praveen Kumar --- xen

[Xen-devel] [Resend][PATCH 06/17] rbtree: break out of rb_insert_color loop after tree rotation

2017-05-31 Thread Praveen Kumar
it wouldn't be used until the next loop iteration, which we now avoid due to this break statement. commit 1f0528653e41ec230c60f5738820e8a544731399 from linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/xen/common/rbtre

[Xen-devel] [Resend][PATCH 07/17] rbtree: adjust root color in rb_insert_color() only when necessary

2017-05-31 Thread Praveen Kumar
existing black parent) the invariant is already satisfied, so there is no need to adjust the root node color. commit 6d58452dc066db61acdff7b84671db1b11a3de1c from linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions

[Xen-devel] [Resend][PATCH 02/17] rb_tree: make clear distinction between two different cases in rb_erase()

2017-05-31 Thread Praveen Kumar
> / C \ / \ \ C / \ Notice that for the special case we don't have to reconnect C to N. commit 4c60117811171d867d4f27f17ea07d7419d45dae from linux tree Signed-off-by:

[Xen-devel] [Resend][PATCH 04/17] rbtree: empty nodes have no color

2017-05-31 Thread Praveen Kumar
Empty nodes have no color. We can make use of this property to simplify the code emitted by the RB_EMPTY_NODE and RB_CLEAR_NODE macros. commit 4c199a93a2d36b277a9fd209a0f2793f8460a215 from linux tree. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 4 ++-- xen/include/xen/rbtree.h

[Xen-devel] [Resend][PATCH 10/17] rbtree: optimize case selection logic in __rb_erase_color()

2017-05-31 Thread Praveen Kumar
range the logic to avoid that extra check. commit e125d1471a4f8f1bf7ea9a83deb8d23cb40bd712 from linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 69 ++--- 1 file changed, 29 insertions(+), 40 deletions(-) diff --git a/xen/comm

[Xen-devel] [Resend][PATCH 08/17] rbtree: low level optimizations in rb_insert_color()

2017-05-31 Thread Praveen Kumar
utes don't have to be set because we know another tree rotation (Case 3) will always follow and override them. commit 5bc9188aa207dafd47eab57df7c4fe5b3d3f636a from linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 160 ++--

[Xen-devel] [Resend][PATCH 09/17] rbtree: adjust node color in __rb_erase_color() only when necessary

2017-05-31 Thread Praveen Kumar
ommit d6ff1273928ebf15466a85b7e1810cd00e72998b from linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index 8db7a5b4ca..736e2a55aa 100644 --- a/xen/common/rbtree.c +++

[Xen-devel] [Resend][PATCH 13/17] rbtree: add __rb_change_child() helper function

2017-05-31 Thread Praveen Kumar
Add __rb_change_child() as an inline helper function to replace code that would otherwise be duplicated 4 times in the source. No changes to binary size or speed. commit 7abc704ae399fcb9c51ca200b0456f8a975a8011 from Linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 54

[Xen-devel] [Resend][PATCH 12/17] rbtree: optimize fetching of sibling node

2017-05-31 Thread Praveen Kumar
fetched child This avoids fetching the parent's left child when node is actually that child. Saves a bit on code size, though it doesn't seem to make a large difference in speed. commit 59633abf34e2f44b8e772a2c12a92132aa7c2220 from Linux tree Signed-off-by: Praveen Kumar

[Xen-devel] [Resend][PATCH 11/17] rbtree: low level optimizations in __rb_erase_color()

2017-05-31 Thread Praveen Kumar
x27;s color, the parent is already known so we can use the more efficient rb_set_parent_color() function to set the desired color. commit 6280d2356fd8ad0936a63c10dc1e6accf48d0c61 from linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c

[Xen-devel] [Resend][PATCH 16/17] rbtree: low level optimizations in rb_erase()

2017-05-31 Thread Praveen Kumar
rate cases 2 and 3. commit 4f035ad67f4633c233cb3642711d49b4efc9c82d from Linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 102 ++-- 1 file changed, 67 insertions(+), 35 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.

[Xen-devel] [Resend][PATCH 17/17] rbtree: add postorder iteration functions

2017-05-31 Thread Praveen Kumar
tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 45 + xen/include/xen/rbtree.h | 4 2 files changed, 49 insertions(+) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index 83b4892f54..3c994dcc0c 100644 --- a/xen/common/rbtree

[Xen-devel] [Resend][PATCH 14/17] rbtree: place easiest case first in rb_erase()

2017-05-31 Thread Praveen Kumar
In rb_erase, move the easy case (node to erase has no more than 1 child) first. I feel the code reads easier that way. commit 60670b8034d6e2ba860af79c9379b7788d09db73 from Linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 36 ++-- 1 file changed

[Xen-devel] [Resend][PATCH 15/17] rbtree: handle 1-child recoloring in rb_erase() instead of rb_erase_color()

2017-05-31 Thread Praveen Kumar
in rb_erase(). __rb_erase_color() then only needs to handle the no-childs case and can be modified accordingly. commit 46b6135a7402ac23c5b25f2bd79b03bab8f98278 from Linux tree Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 110 +++- 1 file

Re: [Xen-devel] [Resend][PATCH 01/17] rb_tree: reorganize code in rb_erase() for additional changes

2017-06-02 Thread Praveen Kumar
>   [a...@linux-foundation.org: coding-style fixes] >   Signed-off-by: Peter Zijlstra >   Signed-off-by: Wolfram Strepp >   Signed-off-by: Andrew Morton >   Signed-off-by: Linus Torvalds >   [Linux commit 16c047add3ceaf0ab882e3e094d1ec904d02312d] > >   Ported to Xen.

Re: [Xen-devel] [Xen-devel[PATCH Resend v2] xen: common: rbtree: ported updates from linux tree

2017-06-02 Thread Praveen Kumar
On Thu, 2017-06-01 at 01:26 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 31.05.17 at 23:20, wrote: > > The patch imports the changes and updates of the rbtree > > implementaiton > > from Linux tree. But since, the only current implementation is with > > tmem.c, > > which am not much a

Re: [Xen-devel] [Xen-devel[PATCH Resend v2] xen: common: rbtree: ported updates from linux tree

2017-06-02 Thread Praveen Kumar
On Thu, 2017-06-01 at 09:43 +0200, Dario Faggioli wrote: > On Thu, 2017-06-01 at 01:26 -0600, Jan Beulich wrote: > > > > > > > > > > > > > > > > > > > On 31.05.17 at 23:20, wrote: > > > I have not imported augmented and rcu rbtree functionality to the > > > xen tree, > > > as there was no spec

Re: [Xen-devel] [RFC PATCH v4] xen: credit2: provide custom option to create runqueue

2017-06-02 Thread Praveen Kumar
Hi, Can you please provide comments on the shared patch. Thanks in advance. Regards, ~Praveen. On Wed, 2017-04-19 at 23:15 +0530, Praveen Kumar wrote: > The patch introduces a new, very flexible way of arranging runqueues > in Credit2. > It allows to specify, explicitly and precis

[Xen-devel] [PATCH v3] xen: common: rbtree: ported updates from

2017-06-17 Thread Praveen Kumar
Hi All, The patch imports the changes and updates of the rbtree implementaiton from Linux tree. But since, the only current implementation is with tmem.c, which am not much aware off much and therefore, was unable to test the changes thoroughly. Having said that, I do have plans of adding futher c

[Xen-devel] [PATCH v2 04/20] rb_tree: make clear distinction between two different cases in rb_erase()

2017-06-17 Thread Praveen Kumar
ew Morton Signed-off-by: Linus Torvalds [Linux commit 4c60117811171d867d4f27f17ea07d7419d45dae] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index 4b85fd49

[Xen-devel] [PATCH 01/20] rbtree: add const qualifier to some functions

2017-06-17 Thread Praveen Kumar
Linus Torvalds [Linux commit f4b477c47332367d35686bd2b808c2156b96d7c7] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 12 ++-- xen/include/xen/rbtree.h | 8 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xen/common/rbtree.c b/x

[Xen-devel] [PATCH v2 03/20] rb_tree: reorganize code in rb_erase() for additional changes

2017-06-17 Thread Praveen Kumar
16c047add3ceaf0ab882e3e094d1ec904d02312d] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index 70cb15f1fe..4b85fd492b 100644 --- a/xen/common/rbtree.c +++ b/xen/common/rbtree.c

[Xen-devel] [PATCH v2 05/20] rb_tree: remove redundant if()-condition in rb_erase()

2017-06-17 Thread Praveen Kumar
tee that old->rb_right is set in the final else branch, therefore we can omit checking that again. Signed-off-by: Wolfram Strepp Signed-off-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 4b324126e0c6c3a5080ca3ec0981e8766ed6f1ee] Ported to Xen. Signed-

[Xen-devel] [PATCH 02/20] lib/rbtree.c: optimize rb_erase()

2017-06-17 Thread Praveen Kumar
if (C) {//...and this too ! . } } Signed-off-by: Wolfram Strepp Acked-by: Peter Zijlstra Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 55a63998b8967615a15e2211ba0ff3a84a565824] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 14 +

[Xen-devel] [PATCH v2 14/20] rbtree: coding style adjustments

2017-06-17 Thread Praveen Kumar
;Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 7ce6ff9e5de99e7b72019c7de82fb438fe1dc5a0] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 44 1 file changed, 24 inserti

[Xen-devel] [PATCH v2 11/20] rbtree: adjust node color in __rb_erase_color() only when necessary

2017-06-17 Thread Praveen Kumar
Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit d6ff1273928ebf15466a85b7e1810cd00e72998b] Ported only rbtree.c to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/xen/co

[Xen-devel] [PATCH v2 09/20] rbtree: adjust root color in rb_insert_color() only when necessary

2017-06-17 Thread Praveen Kumar
ned-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 6d58452dc066db61acdff7b84671db1b11a3de1c] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/xen/common/rbtree.c b/

[Xen-devel] [PATCH v2 08/20] rbtree: break out of rb_insert_color loop after tree rotation

2017-06-17 Thread Praveen Kumar
d-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 1f0528653e41ec230c60f5738820e8a544731399] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c

[Xen-devel] [PATCH v2 19/20] rbtree: low level optimizations in rb_erase()

2017-06-17 Thread Praveen Kumar
rate cases 2 and 3. Signed-off-by: Michel Lespinasse Acked-by: Rik van Riel Cc: Peter Zijlstra Cc: Andrea Arcangeli Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 4f035ad67f4633c233cb3642711d49b4efc9c82d] Ported to Xen. Signed-off-by: Praveen Kuma

[Xen-devel] [PATCH v2 16/20] rbtree: add __rb_change_child() helper function

2017-06-17 Thread Praveen Kumar
-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 7abc704ae399fcb9c51ca200b0456f8a975a8011] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 37 +++-- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/xen/common

[Xen-devel] [PATCH v2 13/20] rbtree: low level optimizations in __rb_erase_color()

2017-06-17 Thread Praveen Kumar
uot;Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 6280d2356fd8ad0936a63c10dc1e6accf48d0c61] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 196 1 file changed, 107 in

[Xen-devel] [PATCH v2 18/20] rbtree: handle 1-child recoloring in rb_erase() instead of rb_erase_color()

2017-06-17 Thread Praveen Kumar
commit 46b6135a7402ac23c5b25f2bd79b03bab8f98278] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 110 +++- 1 file changed, 66 insertions(+), 44 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index

[Xen-devel] [PATCH v2 17/20] rbtree: place easiest case first in rb_erase()

2017-06-17 Thread Praveen Kumar
Torvalds [Linux commit 60670b8034d6e2ba860af79c9379b7788d09db73] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index 2063536548

[Xen-devel] [PATCH v2 06/20] rbtree: empty nodes have no color

2017-06-17 Thread Praveen Kumar
Torvalds [Linux commit 4c199a93a2d36b277a9fd209a0f2793f8460a215] Ported rbtree.h and rbtree.c changes which are relevant to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 4 ++-- xen/include/xen/rbtree.h | 9 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff -

[Xen-devel] [PATCH 20/20] lib/rbtree.c: fix typo in comment of __rb_insert()

2017-06-17 Thread Praveen Kumar
. Signed-off-by: Wei Yang Acked-by: Michel Lespinasse Cc: Xiao Guangrong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 1b9c53e849aa65776d4f611d99aa09f856518dad] Ported to Xen for rb_insert_color API. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 2 +- 1

[Xen-devel] [PATCH v2 07/20] rbtree: move some implementation details from rbtree.h to rbtree.c

2017-06-17 Thread Praveen Kumar
: Peter Zijlstra Cc: Daniel Santos Cc: Jens Axboe Cc: "Eric W. Biederman" Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit bf7ad8eeab995710c766df49c9c69a8592ca0216] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/commo

[Xen-devel] [PATCH v2 12/20] rbtree: optimize case selection logic in __rb_erase_color()

2017-06-17 Thread Praveen Kumar
nux commit e125d1471a4f8f1bf7ea9a83deb8d23cb40bd712] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 62 - 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index 2

[Xen-devel] [PATCH v2 15/20] rbtree: optimize fetching of sibling node

2017-06-17 Thread Praveen Kumar
ijlstra Cc: Daniel Santos Cc: Jens Axboe Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 59633abf34e2f44b8e772a2c12a92132aa7c2220] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 15 +-- 1 fi

[Xen-devel] [PATCH v2 10/20] rbtree: low level optimizations in rb_insert_color()

2017-06-17 Thread Praveen Kumar
rman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 5bc9188aa207dafd47eab57df7c4fe5b3d3f636a] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 159 +--- 1 file changed, 127 insertions(+), 32 d

[Xen-devel] [PATCH v6 01/16] rbtree: remove redundant if()-condition in rb_erase()

2017-11-21 Thread Praveen Kumar
Ported to Xen. Signed-off-by: Praveen Kumar --- Removed new line from previous patch to sync the changes completely with linux code base. --- xen/common/rbtree.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index 167ebfd

[Xen-devel] [PATCH v6 00/16] xen: common: rbtree: ported updates from Linux tree

2017-11-21 Thread Praveen Kumar
functions: 9dee5c51516d2c3fff22633c1272c5652e68075a RCU related implementation : d72da4a4d973d8a0a0d3c97e7cdebf287fbe3a99 c1adf20052d80f776849fa2c1acb472cdeb7786c ce093a04543c403d52c1a5788d8cb92e47453aba Please share your inputs. Thanks in advance. Regards, ~Praveen. Praveen Kumar (16): rbtree

[Xen-devel] [PATCH v6 02/16 RESEND] rbtree: empty nodes have no color

2017-11-21 Thread Praveen Kumar
f-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 4c199a93a2d36b277a9fd209a0f2793f8460a215] Ported rbtree.h and rbtree.c changes which are relevant to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 4 ++-- xen/include/xen/rbtree.h | 8 +--- 2 files changed, 7 insertions(

[Xen-devel] [PATCH v6 04/16 RESEND] rbtree: break out of rb_insert_color loop after tree rotation

2017-11-21 Thread Praveen Kumar
c W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 1f0528653e41ec230c60f5738820e8a544731399] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/xen/co

[Xen-devel] [PATCH v6 03/16 RESEND] rbtree: move some implementation details from rbtree.h to rbtree.c

2017-11-21 Thread Praveen Kumar
Woodhouse Cc: Rik van Riel Cc: Peter Zijlstra Cc: Daniel Santos Cc: Jens Axboe Cc: "Eric W. Biederman" Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit bf7ad8eeab995710c766df49c9c69a8592ca0216] Ported to Xen. Signed-off-by: Pra

[Xen-devel] [PATCH v6 09/16 RESEND] rbtree: low level optimizations in __rb_erase_color()

2017-11-21 Thread Praveen Kumar
Jens Axboe Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 6280d2356fd8ad0936a63c10dc1e6accf48d0c61] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 208 +--- 1 fi

[Xen-devel] [PATCH v6 07/16 RESEND] rbtree: adjust node color in __rb_erase_color() only when necessary

2017-11-21 Thread Praveen Kumar
Cc: Alexander Shishkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit d6ff1273928ebf15466a85b7e1810cd00e72998b] Ported only rbtree.c to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 28 +--- 1 file changed, 17 insertions(+

[Xen-devel] [PATCH v6 05/16 RESEND] rbtree: adjust root color in rb_insert_color() only when necessary

2017-11-21 Thread Praveen Kumar
ric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 6d58452dc066db61acdff7b84671db1b11a3de1c] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/

[Xen-devel] [PATCH v6 08/16 RESEND] rbtree: optimize case selection logic in __rb_erase_color()

2017-11-21 Thread Praveen Kumar
Andrew Morton Signed-off-by: Linus Torvalds [Linux commit e125d1471a4f8f1bf7ea9a83deb8d23cb40bd712] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 68 +++-- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/xen/common/rbtree.c b/x

[Xen-devel] [PATCH v6 10/16 RESEND] rbtree: coding style adjustments

2017-11-21 Thread Praveen Kumar
Cc: Jens Axboe Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 7ce6ff9e5de99e7b72019c7de82fb438fe1dc5a0] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 42 +++--- 1 file c

[Xen-devel] [PATCH v6 11/16 RESEND] rbtree: optimize fetching of sibling node

2017-11-21 Thread Praveen Kumar
ed-by: Rik van Riel Cc: Peter Zijlstra Cc: Daniel Santos Cc: Jens Axboe Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 59633abf34e2f44b8e772a2c12a92132aa7c2220] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 21 +

[Xen-devel] [PATCH v6 12/16 RESEND] rbtree: add __rb_change_child() helper function

2017-11-21 Thread Praveen Kumar
: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 7abc704ae399fcb9c51ca200b0456f8a975a8011] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 46 +- 1 file changed, 17 insertions(+), 29

[Xen-devel] [PATCH v6 06/16 RESEND] rbtree: low level optimizations in rb_insert_color()

2017-11-21 Thread Praveen Kumar
oe Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 5bc9188aa207dafd47eab57df7c4fe5b3d3f636a] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 166 +--- 1 file chang

[Xen-devel] [PATCH v6 14/16] rbtree: handle 1-child recoloring in rb_erase() instead of rb_erase_color()

2017-11-21 Thread Praveen Kumar
-by: Linus Torvalds [Linux commit 46b6135a7402ac23c5b25f2bd79b03bab8f98278] Ported to Xen. Signed-off-by: Praveen Kumar --- Removed new line from previous patch to make inline with Linux code base --- xen/common/rbtree.c | 105 +++- 1 file changed

[Xen-devel] [PATCH v6 15/16 RESEND] rbtree: low level optimizations in rb_erase()

2017-11-21 Thread Praveen Kumar
en. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 98 ++--- 1 file changed, 64 insertions(+), 34 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index e7df273800..5c4e239c24 100644 --- a/xen/common/rbtree.c +++ b/xen/common

[Xen-devel] [PATCH v6 16/16 RESEND] rbtree: fix typo in comment of rb_insert_color

2017-11-21 Thread Praveen Kumar
typo in comment. Signed-off-by: Wei Yang Acked-by: Michel Lespinasse Cc: Xiao Guangrong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 1b9c53e849aa65776d4f611d99aa09f856518dad] Ported to Xen for rb_insert_color API. Signed-off-by: Praveen Kumar --- xen/common

[Xen-devel] [PATCH v6 13/16 RESEND] rbtree: place easiest case first in rb_erase()

2017-11-21 Thread Praveen Kumar
Signed-off-by: Linus Torvalds [Linux commit 60670b8034d6e2ba860af79c9379b7788d09db73] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common

Re: [Xen-devel] [PATCH v5 01/17] rbtree: changes to align the coding conventions with Linux tree

2017-08-04 Thread Praveen Kumar
Hi Dario, On Thu, Aug 3, 2017 at 4:07 PM, Dario Faggioli wrote: > On Fri, 2017-07-14 at 07:05 -0600, Jan Beulich wrote: >> > > > On 14.07.17 at 14:51, wrote: >> > >> > Agreed, I shouldn't have added. >> > rbtree.h file does include incline functions which are actually >> > commented, and in orde

Re: [Xen-devel] [PATCH v5 01/17] rbtree: changes to align the coding conventions with Linux tree

2017-08-04 Thread Praveen Kumar
the change in location and difference in code statements, the patch application have failed. Please suggest if I can perform this is a better way. Thanks in advance. On Fri, Aug 4, 2017 at 10:34 PM, Jan Beulich wrote: >>>> Praveen Kumar 08/04/17 7:00 PM >>> >>There w

Re: [Xen-devel] [PATCH 01/20] rbtree: add const qualifier to some functions

2017-06-19 Thread Praveen Kumar
>> >> warning: passing argument 1 of ‘rb_next’ discards qualifiers from pointer >> target >> type >> >> Signed-off-by: Artem Bityutskiy >> Signed-off-by: David Woodhouse >> Signed-off-by: Linus Torvalds >> [Linux commit f4b477c47332367d3568

Re: [Xen-devel] [PATCH v2 09/20] rbtree: adjust root color in rb_insert_color() only when necessary

2017-06-27 Thread Praveen Kumar
Hi Dario and Jan, Sorry, I missed this update. On Tue, Jun 20, 2017 at 7:24 PM, Dario Faggioli wrote: > > On Tue, 2017-06-20 at 01:26 -0600, Jan Beulich wrote: > > > > > > > > > > > > > > > > > > > On 19.06.17 at 19:13, wrote: > > > And here we are again. (I.e., in the cited Linux's commit

[Xen-devel] [PATCH v4 03/17] rbtree: empty nodes have no color

2017-07-03 Thread Praveen Kumar
f-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 4c199a93a2d36b277a9fd209a0f2793f8460a215] Ported rbtree.h and rbtree.c changes which are relevant to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 4 ++-- xen/include/xen/rbtree.h | 8 +--- 2 files changed, 7 insertions(

[Xen-devel] [PATCH v4 00/17] xen: common: rbtree: ported updates from Linux tree

2017-07-03 Thread Praveen Kumar
, ~Praveen. Praveen Kumar (17): rbtree: changes to inline coding conventions with Linux tree rbtree: remove redundant if()-condition in rb_erase() rbtree: empty nodes have no color rbtree: move some implementation details from rbtree.h to rbtree.c rbtree: break out of rb_insert_color loop after

[Xen-devel] [PATCH v4 01/17] rbtree: changes to inline coding conventions with Linux tree

2017-07-03 Thread Praveen Kumar
The patch inlines the rbtree related files to Linux coding conventions to have limited conflicts in future while porting from Linux tree. Signed-off-by: Praveen Kumar --- New in v4. --- xen/common/rbtree.c | 630 +++ xen/include/xen/rbtree.h

[Xen-devel] [PATCH v4 02/17] rbtree: remove redundant if()-condition in rb_erase()

2017-07-03 Thread Praveen Kumar
Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/common/rbtree.c b/xen/common/rbtree.c index d5e3d06b80..3a19b44a2f 100644 --- a/xen/common/rbtree.c +++ b/xen/common/rbtree.c @@ -249,15 +249,16 @

[Xen-devel] [PATCH v4 06/17] rbtree: adjust root color in rb_insert_color() only when necessary

2017-07-03 Thread Praveen Kumar
ric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 6d58452dc066db61acdff7b84671db1b11a3de1c] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/

[Xen-devel] [PATCH v4 04/17] rbtree: move some implementation details from rbtree.h to rbtree.c

2017-07-03 Thread Praveen Kumar
Woodhouse Cc: Rik van Riel Cc: Peter Zijlstra Cc: Daniel Santos Cc: Jens Axboe Cc: "Eric W. Biederman" Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit bf7ad8eeab995710c766df49c9c69a8592ca0216] Ported to Xen. Signed-off-by: Pra

[Xen-devel] [PATCH v4 05/17] rbtree: break out of rb_insert_color loop after tree rotation

2017-07-03 Thread Praveen Kumar
c W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 1f0528653e41ec230c60f5738820e8a544731399] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/xen/co

[Xen-devel] [PATCH v4 07/17] rbtree: low level optimizations in rb_insert_color()

2017-07-03 Thread Praveen Kumar
oe Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 5bc9188aa207dafd47eab57df7c4fe5b3d3f636a] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 166 +--- 1 file chang

[Xen-devel] [PATCH v4 08/17] rbtree: adjust node color in __rb_erase_color() only when necessary

2017-07-03 Thread Praveen Kumar
Cc: Alexander Shishkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit d6ff1273928ebf15466a85b7e1810cd00e72998b] Ported only rbtree.c to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 28 +--- 1 file changed, 17 insertions(+

[Xen-devel] [PATCH v4 09/17] rbtree: optimize case selection logic in __rb_erase_color()

2017-07-03 Thread Praveen Kumar
Andrew Morton Signed-off-by: Linus Torvalds [Linux commit e125d1471a4f8f1bf7ea9a83deb8d23cb40bd712] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 68 +++-- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/xen/common/rbtree.c b/x

[Xen-devel] [PATCH v4 10/17] rbtree: low level optimizations in __rb_erase_color()

2017-07-03 Thread Praveen Kumar
Jens Axboe Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Linux commit 6280d2356fd8ad0936a63c10dc1e6accf48d0c61] Ported to Xen. Signed-off-by: Praveen Kumar --- xen/common/rbtree.c | 208 +--- 1 fi

  1   2   >