[PATCH v2 1/1] af_unix: Allow Unix sockets to raise SIGURG

2021-02-10 Thread rao . shoaib
From: Rao Shoaib TCP sockets allow SIGURG to be sent to the process holding the other end of the socket. Extend Unix sockets to have the same ability but only if the data length is zero. The API is the same in that the sender uses sendmsg() with MSG_OOB to raise SIGURG. Unix sockets behave

[PATCH v1 0/1] rxe driver should dynamically caclculate inline data size

2019-10-23 Thread rao Shoaib
From: Rao Shoaib Resending because of typo in the email addresses. Currently rxe driver has a hard coded value for inline data size, where as mlx5 driver calculates the size of inline data and number of SGE's to use based on the values in the qp request. Some applications depend

[PATCH v1 1/1] rxe: calculate inline data size based on requested values

2019-10-23 Thread rao Shoaib
From: Rao Shoaib rxe driver has a hard coded value for the size of inline data, where as mlx5 driver calculates number of SGE's and inline data size based on the values in the qp request. This patch modifies rxe driver to do the same so that applications can work seamlessly across drivers

Re: [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-04 Thread Rao Shoaib
On 04/04/2018 12:16 AM, Rao Shoaib wrote: On 04/03/2018 07:23 PM, Matthew Wilcox wrote: On Tue, Apr 03, 2018 at 05:55:55PM -0700, Rao Shoaib wrote: On 04/03/2018 01:58 PM, Matthew Wilcox wrote: I think you might be better off with an IDR.  The IDR can always contain one entry, so there's

Re: [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-04 Thread Rao Shoaib
On 04/04/2018 12:16 AM, Rao Shoaib wrote: On 04/03/2018 07:23 PM, Matthew Wilcox wrote: On Tue, Apr 03, 2018 at 05:55:55PM -0700, Rao Shoaib wrote: On 04/03/2018 01:58 PM, Matthew Wilcox wrote: I think you might be better off with an IDR.  The IDR can always contain one entry, so there's

Re: [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-04 Thread Rao Shoaib
On 04/02/2018 10:20 AM, Christopher Lameter wrote: On Sun, 1 Apr 2018, rao.sho...@oracle.com wrote: kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures as it is more efficient. It would be even better if this approach could also use

Re: [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-04 Thread Rao Shoaib
On 04/02/2018 10:20 AM, Christopher Lameter wrote: On Sun, 1 Apr 2018, rao.sho...@oracle.com wrote: kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures as it is more efficient. It would be even better if this approach could also use

Re: [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-04 Thread Rao Shoaib
On 04/03/2018 07:23 PM, Matthew Wilcox wrote: On Tue, Apr 03, 2018 at 05:55:55PM -0700, Rao Shoaib wrote: On 04/03/2018 01:58 PM, Matthew Wilcox wrote: I think you might be better off with an IDR. The IDR can always contain one entry, so there's no need for this 'rbf_list_head

Re: [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-04 Thread Rao Shoaib
On 04/03/2018 07:23 PM, Matthew Wilcox wrote: On Tue, Apr 03, 2018 at 05:55:55PM -0700, Rao Shoaib wrote: On 04/03/2018 01:58 PM, Matthew Wilcox wrote: I think you might be better off with an IDR. The IDR can always contain one entry, so there's no need for this 'rbf_list_head

Re: [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-03 Thread Rao Shoaib
On 04/03/2018 01:58 PM, Matthew Wilcox wrote: On Tue, Apr 03, 2018 at 10:22:53AM -0700, rao.sho...@oracle.com wrote: +++ b/mm/slab.h @@ -80,6 +80,29 @@ extern const struct kmalloc_info_struct { unsigned long size; } kmalloc_info[]; +#define RCU_MAX_ACCUMULATE_SIZE 25 + +struct

Re: [PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-03 Thread Rao Shoaib
On 04/03/2018 01:58 PM, Matthew Wilcox wrote: On Tue, Apr 03, 2018 at 10:22:53AM -0700, rao.sho...@oracle.com wrote: +++ b/mm/slab.h @@ -80,6 +80,29 @@ extern const struct kmalloc_info_struct { unsigned long size; } kmalloc_info[]; +#define RCU_MAX_ACCUMULATE_SIZE 25 + +struct

[PATCH 0/2] Move kfree_rcu out of rcu code and use kfree_bulk

2018-04-03 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> This patch moves kfree_call_rcu() out of rcu related code to mm/slab_common and updates kfree_rcu() to use new bulk memory free functions as they are more efficient. This is a resubmission of the previous patch. Changes since last subm

[PATCH 0/2] Move kfree_rcu out of rcu code and use kfree_bulk

2018-04-03 Thread rao . shoaib
From: Rao Shoaib This patch moves kfree_call_rcu() out of rcu related code to mm/slab_common and updates kfree_rcu() to use new bulk memory free functions as they are more efficient. This is a resubmission of the previous patch. Changes since last submission Surrounded code

[PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-03 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures as it is more efficient. Signed-off-by: Rao Shoaib <rao.sho...@oracle.com> --- include/linux/mm.h | 5 ++ include/linux/rcupdate.h | 4 +- include/lin

[PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-04-03 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> kfree_call_rcu does not belong in linux/rcupdate.h and should be moved to slab_common.c Signed-off-by: Rao Shoaib <rao.sho...@oracle.com> --- include/linux/rcupdate.h | 43 +++ include/linux/rcu

[PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-03 Thread rao . shoaib
From: Rao Shoaib kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures as it is more efficient. Signed-off-by: Rao Shoaib --- include/linux/mm.h | 5 ++ include/linux/rcupdate.h | 4 +- include/linux/rcutiny.h | 8 ++- kernel/sysctl.c | 40

[PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-04-03 Thread rao . shoaib
From: Rao Shoaib kfree_call_rcu does not belong in linux/rcupdate.h and should be moved to slab_common.c Signed-off-by: Rao Shoaib --- include/linux/rcupdate.h | 43 +++ include/linux/rcutree.h | 2 -- include/linux/slab.h | 42

[PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-04-01 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> kfree_call_rcu does not belong in linux/rcupdate.h and should be moved to slab_common.c Signed-off-by: Rao Shoaib <rao.sho...@oracle.com> --- include/linux/rcupdate.h | 43 +++ include/linux/rcu

[PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-04-01 Thread rao . shoaib
From: Rao Shoaib kfree_call_rcu does not belong in linux/rcupdate.h and should be moved to slab_common.c Signed-off-by: Rao Shoaib --- include/linux/rcupdate.h | 43 +++ include/linux/rcutree.h | 2 -- include/linux/slab.h | 42

[PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-01 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures as it is more efficient. Signed-off-by: Rao Shoaib <rao.sho...@oracle.com> --- include/linux/mm.h | 5 ++ include/linux/rcutiny.h | 8 ++- ker

[PATCH 0/2] Move kfree_rcu out of rcu code and use kfree_bulk

2018-04-01 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> This patch moves kfree_call_rcu() out of rcu related code to mm/slab_common and updates kfree_rcu() to use new bulk memory free functions as they are more efficient. This is a resubmission of the previous patch. Changes: 1) checkpatch.pl has been

[PATCH 2/2] kfree_rcu() should use kfree_bulk() interface

2018-04-01 Thread rao . shoaib
From: Rao Shoaib kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures as it is more efficient. Signed-off-by: Rao Shoaib --- include/linux/mm.h | 5 ++ include/linux/rcutiny.h | 8 ++- kernel/sysctl.c | 40 mm/slab.h

[PATCH 0/2] Move kfree_rcu out of rcu code and use kfree_bulk

2018-04-01 Thread rao . shoaib
From: Rao Shoaib This patch moves kfree_call_rcu() out of rcu related code to mm/slab_common and updates kfree_rcu() to use new bulk memory free functions as they are more efficient. This is a resubmission of the previous patch. Changes: 1) checkpatch.pl has been fixed, so kfree_rcu macro

[PATCH 1/1] MACRO_ARG_REUSE in checkpatch.pl is confused about * in typeof

2018-03-31 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> Example: CHECK: Macro argument reuse 'ptr' - possible side-effects? +#define kfree_rcu(ptr, rcu_name) \ + do {\ + unsigned long __off = offsetof(typeof(*(ptr)), rcu_name); \ +

[PATCH 1/1] MACRO_ARG_REUSE in checkpatch.pl is confused about * in typeof

2018-03-31 Thread rao . shoaib
From: Rao Shoaib Example: CHECK: Macro argument reuse 'ptr' - possible side-effects? +#define kfree_rcu(ptr, rcu_name) \ + do {\ + unsigned long __off = offsetof(typeof(*(ptr)), rcu_name); \ + struct rcu_head *__rptr = (void

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-03-26 Thread Rao Shoaib
Folks, Is anyone working on resolving the check patch issue as I am waiting to resubmit my patch. Will it be fine if I submitted the patch with the original macro as the check is in-correct. I do not speak perl but I can do the process work. If folks think Joe's fix is fine I can submit it

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-03-26 Thread Rao Shoaib
Folks, Is anyone working on resolving the check patch issue as I am waiting to resubmit my patch. Will it be fine if I submitted the patch with the original macro as the check is in-correct. I do not speak perl but I can do the process work. If folks think Joe's fix is fine I can submit it

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-04 Thread Rao Shoaib
On 01/04/2018 04:07 PM, Matthew Wilcox wrote: On Thu, Jan 04, 2018 at 03:47:32PM -0800, Paul E. McKenney wrote: I was under the impression that typeof did not actually evaluate its argument, but rather only returned its type. And there are a few macros with this pattern in mainline. Or am I

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-04 Thread Rao Shoaib
On 01/04/2018 04:07 PM, Matthew Wilcox wrote: On Thu, Jan 04, 2018 at 03:47:32PM -0800, Paul E. McKenney wrote: I was under the impression that typeof did not actually evaluate its argument, but rather only returned its type. And there are a few macros with this pattern in mainline. Or am I

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-04 Thread Rao Shoaib
On 01/04/2018 01:46 PM, Matthew Wilcox wrote: On Thu, Jan 04, 2018 at 01:27:49PM -0800, Rao Shoaib wrote: On 01/04/2018 12:35 PM, Rao Shoaib wrote: As far as your previous comments are concerned, only the following one has not been addressed. Can you please elaborate as I do not understand

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-04 Thread Rao Shoaib
On 01/04/2018 01:46 PM, Matthew Wilcox wrote: On Thu, Jan 04, 2018 at 01:27:49PM -0800, Rao Shoaib wrote: On 01/04/2018 12:35 PM, Rao Shoaib wrote: As far as your previous comments are concerned, only the following one has not been addressed. Can you please elaborate as I do not understand

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-04 Thread Rao Shoaib
On 01/04/2018 12:35 PM, Rao Shoaib wrote: Hi Boqun, Thanks a lot for all your guidance and for catching the cut and paster error. Please see inline. On 01/03/2018 05:38 PM, Boqun Feng wrote: But you introduced a bug here, you should use rcu_state_p instead of _sched_state as the third

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-04 Thread Rao Shoaib
On 01/04/2018 12:35 PM, Rao Shoaib wrote: Hi Boqun, Thanks a lot for all your guidance and for catching the cut and paster error. Please see inline. On 01/03/2018 05:38 PM, Boqun Feng wrote: But you introduced a bug here, you should use rcu_state_p instead of _sched_state as the third

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-04 Thread Rao Shoaib
Hi Boqun, Thanks a lot for all your guidance and for catching the cut and paster error. Please see inline. On 01/03/2018 05:38 PM, Boqun Feng wrote: But you introduced a bug here, you should use rcu_state_p instead of _sched_state as the third parameter for __call_rcu(). Please re-read:

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-04 Thread Rao Shoaib
Hi Boqun, Thanks a lot for all your guidance and for catching the cut and paster error. Please see inline. On 01/03/2018 05:38 PM, Boqun Feng wrote: But you introduced a bug here, you should use rcu_state_p instead of _sched_state as the third parameter for __call_rcu(). Please re-read:

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-02 Thread Rao Shoaib
On 01/02/2018 02:23 PM, Matthew Wilcox wrote: On Tue, Jan 02, 2018 at 12:11:37PM -0800, rao.sho...@oracle.com wrote: -#define kfree_rcu(ptr, rcu_head) \ - __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) +#define kfree_rcu(ptr,

Re: [PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-02 Thread Rao Shoaib
On 01/02/2018 02:23 PM, Matthew Wilcox wrote: On Tue, Jan 02, 2018 at 12:11:37PM -0800, rao.sho...@oracle.com wrote: -#define kfree_rcu(ptr, rcu_head) \ - __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) +#define kfree_rcu(ptr,

[PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-02 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> Signed-off-by: Rao Shoaib <rao.sho...@oracle.com> --- include/linux/rcupdate.h | 43 +++ include/linux/rcutree.h | 2 -- include/linux/slab.h | 44

[PATCH 1/2] Move kfree_call_rcu() to slab_common.c

2018-01-02 Thread rao . shoaib
From: Rao Shoaib Signed-off-by: Rao Shoaib --- include/linux/rcupdate.h | 43 +++ include/linux/rcutree.h | 2 -- include/linux/slab.h | 44 kernel/rcu/tree.c| 24 ++-- mm

[PATCH 2/2] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2018-01-02 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> Signed-off-by: Rao Shoaib <rao.sho...@oracle.com> --- include/linux/mm.h | 5 ++ include/linux/rcutiny.h | 8 ++- kernel/sysctl.c | 40 mm/slab.h | 23 +++ mm/slab_common.c

[PATCH 2/2] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2018-01-02 Thread rao . shoaib
From: Rao Shoaib Signed-off-by: Rao Shoaib --- include/linux/mm.h | 5 ++ include/linux/rcutiny.h | 8 ++- kernel/sysctl.c | 40 mm/slab.h | 23 +++ mm/slab_common.c| 161 +++- 5 files changed

Re: [PATCH] Move kfree_call_rcu() to slab_common.c

2017-12-21 Thread Rao Shoaib
On 12/21/2017 04:36 AM, Matthew Wilcox wrote: On Thu, Dec 21, 2017 at 12:19:47AM -0800, rao.sho...@oracle.com wrote: This patch moves kfree_call_rcu() and related macros out of rcu code. A new function __call_rcu_lazy() is created for calling __call_rcu() with the lazy flag. Something you

Re: [PATCH] Move kfree_call_rcu() to slab_common.c

2017-12-21 Thread Rao Shoaib
On 12/21/2017 04:36 AM, Matthew Wilcox wrote: On Thu, Dec 21, 2017 at 12:19:47AM -0800, rao.sho...@oracle.com wrote: This patch moves kfree_call_rcu() and related macros out of rcu code. A new function __call_rcu_lazy() is created for calling __call_rcu() with the lazy flag. Something you

[PATCH] Move kfree_call_rcu() to slab_common.c

2017-12-21 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> This patch moves kfree_call_rcu() and related macros out of rcu code. A new function __call_rcu_lazy() is created for calling __call_rcu() with the lazy flag. Also moving macros generated following checkpatch noise. I do not know how to silence chec

[PATCH] Move kfree_call_rcu() to slab_common.c

2017-12-21 Thread rao . shoaib
From: Rao Shoaib This patch moves kfree_call_rcu() and related macros out of rcu code. A new function __call_rcu_lazy() is created for calling __call_rcu() with the lazy flag. Also moving macros generated following checkpatch noise. I do not know how to silence checkpatch as there is nothing

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 02:12 PM, Matthew Wilcox wrote: On Tue, Dec 19, 2017 at 09:41:58PM +0100, Jesper Dangaard Brouer wrote: If I had to implement this: I would choose to do the optimization in __rcu_process_callbacks() create small on-call-stack ptr-array for kfree_bulk(). I would only optimize

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 02:12 PM, Matthew Wilcox wrote: On Tue, Dec 19, 2017 at 09:41:58PM +0100, Jesper Dangaard Brouer wrote: If I had to implement this: I would choose to do the optimization in __rcu_process_callbacks() create small on-call-stack ptr-array for kfree_bulk(). I would only optimize

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 12:41 PM, Jesper Dangaard Brouer wrote: On Tue, 19 Dec 2017 09:52:27 -0800 rao.sho...@oracle.com wrote: +/* Main RCU function that is called to free RCU structures */ +static void +__rcu_bulk_free(struct rcu_head *head, rcu_callback_t func, int cpu, bool lazy) +{ +

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 12:41 PM, Jesper Dangaard Brouer wrote: On Tue, 19 Dec 2017 09:52:27 -0800 rao.sho...@oracle.com wrote: +/* Main RCU function that is called to free RCU structures */ +static void +__rcu_bulk_free(struct rcu_head *head, rcu_callback_t func, int cpu, bool lazy) +{ +

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 11:33 AM, Christopher Lameter wrote: On Tue, 19 Dec 2017, rao.sho...@oracle.com wrote: This patch updates kfree_rcu to use new bulk memory free functions as they are more efficient. It also moves kfree_call_rcu() out of rcu related code to mm/slab_common.c It would be great to

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 11:33 AM, Christopher Lameter wrote: On Tue, 19 Dec 2017, rao.sho...@oracle.com wrote: This patch updates kfree_rcu to use new bulk memory free functions as they are more efficient. It also moves kfree_call_rcu() out of rcu related code to mm/slab_common.c It would be great to

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 11:30 AM, Matthew Wilcox wrote: On Tue, Dec 19, 2017 at 09:52:27AM -0800, rao.sho...@oracle.com wrote: @@ -129,6 +130,7 @@ int __kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t nr, for (i = 0; i < nr; i++) { void *x = p[i] =

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
On 12/19/2017 11:30 AM, Matthew Wilcox wrote: On Tue, Dec 19, 2017 at 09:52:27AM -0800, rao.sho...@oracle.com wrote: @@ -129,6 +130,7 @@ int __kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t nr, for (i = 0; i < nr; i++) { void *x = p[i] =

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
Signed-off-by: Rao Shoaib <rao.sho...@oracle.com> --- include/linux/mm.h | 5 ++ kernel/rcu/tree.c | 14 kernel/sysctl.c| 40 +++ mm/slab.h | 23 +++ mm/slab_common.c | 198 - 5 files changed, 264 inse

Re: [PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread Rao Shoaib
Signed-off-by: Rao Shoaib --- include/linux/mm.h | 5 ++ kernel/rcu/tree.c | 14 kernel/sysctl.c| 40 +++ mm/slab.h | 23 +++ mm/slab_common.c | 198 - 5 files changed, 264 insertions(+), 16 deletions

[PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread rao . shoaib
From: Rao Shoaib <rao.sho...@oracle.com> This patch updates kfree_rcu to use new bulk memory free functions as they are more efficient. It also moves kfree_call_rcu() out of rcu related code to mm/slab_common.c Signed-off-by: Rao Shoaib <rao.sho...@oracle.com> --- include/linu

[PATCH] kfree_rcu() should use the new kfree_bulk() interface for freeing rcu structures

2017-12-19 Thread rao . shoaib
From: Rao Shoaib This patch updates kfree_rcu to use new bulk memory free functions as they are more efficient. It also moves kfree_call_rcu() out of rcu related code to mm/slab_common.c Signed-off-by: Rao Shoaib --- include/linux/mm.h | 5 ++ kernel/rcu/tree.c | 14 kernel/sysctl.c