Re: [PATCH 1/2] scsi: smartpqi: Replace semaphore sync_request_sem with mutex

2016-10-24 Thread Binoy Jayan
On 20 October 2016 at 14:40, Arnd Bergmann wrote: > On Thursday, October 20, 2016 2:24:01 PM CEST Binoy Jayan wrote: >> - sema_init(&ctrl_info->sync_request_sem, >> - PQI_RESERVED_IO_SLOTS_SYNCHRONOUS_REQUESTS); >> + mutex_init(&a

dm-crypt optimization

2016-12-20 Thread Binoy Jayan
At a high level the goal is to maximize the size of data blocks that get passed to hardware accelerators, minimizing the overhead from setting up and tearing down operations in the hardware. Currently dm-crypt itself is a big blocker as it manually implements ESSIV and similar algorithms which allo

Re: dm-crypt optimization

2016-12-22 Thread Binoy Jayan
Hi Milan, On 21 December 2016 at 18:17, Milan Broz wrote: > So the core problem is that your crypto accelerator can operate efficiently > only > with bigger batch sizes. Thank you for the reply. Yes, that would be rather an improvement when having bigger block sizes. > How big blocks your cry

Re: [RFC PATCH v2] crypto: Add IV generation algorithms

2016-12-22 Thread Binoy Jayan
Hi Herbert, On 22 December 2016 at 14:25, Herbert Xu wrote: > On Tue, Dec 13, 2016 at 11:01:08AM +0100, Milan Broz wrote: >> >> By the move everything to cryptoAPI we are basically introducing some >> strange mix >> of IV and modes there, I wonder how this is going to be maintained. >> Anyway, H

[PATCH v2 2/8] IB/core: Replace semaphore sm_sem with completion

2016-10-25 Thread Binoy Jayan
The semaphore 'sm_sem' is used as completion, so convert it to struct completion. Semaphores are going away in the future. The initial status of the completion variable is marked as completed by a call to the function 'complete' immediately following the initialization. Signed

[PATCH v2 0/8] infiniband: Remove semaphores

2016-10-25 Thread Binoy Jayan
ing counting semaphores IB/mthca : Remove mutex_[un]lock from *_cmd_use_events/*_cmd_use_polling IB/mlx5 : Cleanup, add helper mlx5_ib_post_send_wait Thanks, Binoy Binoy Jayan (8): IB/core: iwpm_nlmsg_request: Replace semaphore with completion IB/core: Replace semaphore sm_sem with completion

[PATCH v2 8/8] IB/mlx5: Add helper mlx5_ib_post_send_wait

2016-10-25 Thread Binoy Jayan
ified to replace the semaphore with an alternative. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/mr.c | 96 + 1 file changed, 29 insertions(+), 67 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c in

[PATCH v2 6/8] IB/hns: Replace counting semaphore event_sem with wait_event

2016-10-25 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore mthca_cmd::event_sem with a conditional wait_event. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 37 + drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- 2

[PATCH v2 4/8] IB/mthca: Replace semaphore poll_sem with mutex

2016-10-25 Thread Binoy Jayan
The semaphore 'poll_sem' is a simple mutex, so it should be written as one. Semaphores are going away in the future. So replace the semaphore 'poll_sem' with a mutex. Also, remove mutex_[un]lock from mthca_cmd_use_events and mthca_cmd_use_polling respectively. Signed

[PATCH v2 3/8] IB/hns: Replace semaphore poll_sem with mutex

2016-10-25 Thread Binoy Jayan
The semaphore 'poll_sem' is a simple mutex, so it should be written as one. Semaphores are going away in the future. So replace the semaphore 'poll_sem' with a mutex. Also, remove mutex_[un]lock from mthca_cmd_use_events and mthca_cmd_use_polling respectively. Signed

[PATCH v2 1/8] IB/core: iwpm_nlmsg_request: Replace semaphore with completion

2016-10-25 Thread Binoy Jayan
Semaphore sem in iwpm_nlmsg_request is used as completion, so convert it to a struct completion type. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/core/iwpm_msg.c | 8 drivers/infiniband/core/iwpm_util.c | 7 +++ drivers/infiniband

[PATCH v2 5/8] IB/isert: Replace semaphore sem with completion

2016-10-25 Thread Binoy Jayan
The semaphore 'sem' in isert_device is used as completion, so convert it to struct completion. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/ulp/isert/ib_isert.c | 6 +++--- drivers/infiniband/ulp/isert/ib_isert.h | 3 ++- 2 files

[PATCH v2 7/8] IB/mthca: Replace counting semaphore event_sem with wait_event

2016-10-25 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore mthca_cmd::event_sem with a conditional wait_event. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mthca/mthca_cmd.c | 37 - drivers/infiniband/hw/mthca/mthca_dev.h | 3 ++- 2 files

Re: [PATCH v2 8/8] IB/mlx5: Add helper mlx5_ib_post_send_wait

2016-10-25 Thread Binoy Jayan
On 25 October 2016 at 17:53, Arnd Bergmann wrote: > On Tuesday, October 25, 2016 5:31:59 PM CEST Binoy Jayan wrote: > Looks reasonable. Thank you Arnd for looking at it again. > Did you get a warning about 'bad' being unused here? I would have > guessed not, since the orig

Re: [PATCH v2 6/8] IB/hns: Replace counting semaphore event_sem with wait_event

2016-10-25 Thread Binoy Jayan
On 25 October 2016 at 17:58, Arnd Bergmann wrote: > On Tuesday, October 25, 2016 5:31:57 PM CEST Binoy Jayan wrote: >> static int __hns_roce_cmd_mbox_wait(struct hns_roce_dev *hr_dev, u64 >> in_param, >> u64 out_param, unsigned long in_mo

Re: [PATCH v2 8/8] IB/mlx5: Add helper mlx5_ib_post_send_wait

2016-10-25 Thread Binoy Jayan
On 25 October 2016 at 17:56, Leon Romanovsky wrote: > On Tue, Oct 25, 2016 at 05:31:59PM +0530, Binoy Jayan wrote: > In case of success (err == 0), you will call to unmap_dma instead of > normal flow. > > NAK, > Leon Romanovsky Hi Loen, Even in the original code, the reg

Re: [PATCH v2 6/8] IB/hns: Replace counting semaphore event_sem with wait_event

2016-10-25 Thread Binoy Jayan
On 25 October 2016 at 18:51, Arnd Bergmann wrote: > On Tuesday, October 25, 2016 6:29:45 PM CEST Binoy Jayan wrote: > > Something like > > static struct hns_roce_cmd_context *hns_roce_try_get_context(struct > hns_roce_cmdq *cmd) > { > struct hns_roce_cmd

Re: [PATCH v2 2/8] IB/core: Replace semaphore sm_sem with completion

2016-10-25 Thread Binoy Jayan
On 25 October 2016 at 18:13, Jack Wang wrote: > Hi Binoy, > > snip >> >> port->ib_dev = device; >> port->port_num = port_num; >> - sema_init(&port->sm_sem, 1); >> + init_completion(&port->sm_comp); >> + complete(&port->sm_comp); > > Why complete here? > >>

[PATCH v3 1/9] IB/core: iwpm_nlmsg_request: Replace semaphore with completion

2016-10-26 Thread Binoy Jayan
Semaphore sem in iwpm_nlmsg_request is used as completion, so convert it to a struct completion type. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/core/iwpm_msg.c | 8 drivers/infiniband/core/iwpm_util.c | 7 +++ drivers/infiniband

[PATCH v3 3/9] IB/hns: Replace semaphore poll_sem with mutex

2016-10-26 Thread Binoy Jayan
The semaphore 'poll_sem' is a simple mutex, so it should be written as one. Semaphores are going away in the future. So replace the semaphore 'poll_sem' with a mutex. Also, remove mutex_[un]lock from mthca_cmd_use_events and mthca_cmd_use_polling respectively. Signed

[PATCH v3 2/9] IB/core: Replace semaphore sm_sem with an atomic wait

2016-10-26 Thread Binoy Jayan
The semaphore 'sm_sem' is used for an exclusive ownership of the device so model the same as an atomic variable with an associated wait_event. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/core/user_mad.c | 20 ++-- 1 file c

[PATCH v3 8/9] IB/mlx5: Add helper mlx5_ib_post_send_wait

2016-10-26 Thread Binoy Jayan
the semaphore, which can then be rewritten to use something else. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/mr.c | 115 +++- 1 file changed, 32 insertions(+), 83 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/h

[PATCH v3 6/9] IB/hns: Replace counting semaphore event_sem with wait_event

2016-10-26 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore mthca_cmd::event_sem with a conditional wait_event. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 44 - drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- 2

[PATCH v3 9/9] IB/mlx5: Simplify completion into a wait_event

2016-10-26 Thread Binoy Jayan
Convert the completion 'mlx5_ib_umr_context:done' to a wait_event as it just waits for the return value to be filled. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/mr.c | 7 --- include/rdma/ib_verbs.h

[PATCH v3 4/9] IB/mthca: Replace semaphore poll_sem with mutex

2016-10-26 Thread Binoy Jayan
The semaphore 'poll_sem' is a simple mutex, so it should be written as one. Semaphores are going away in the future. So replace the semaphore 'poll_sem' with a mutex. Also, remove mutex_[un]lock from mthca_cmd_use_events and mthca_cmd_use_polling respectively. Signed

[PATCH v3 7/9] IB/mthca: Replace counting semaphore event_sem with wait_event

2016-10-26 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore mthca_cmd::event_sem with a conditional wait_event. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mthca/mthca_cmd.c | 45 ++--- drivers/infiniband/hw/mthca/mthca_dev.h | 3 ++- 2 files

[PATCH v3 5/9] IB/isert: Replace semaphore sem with completion

2016-10-26 Thread Binoy Jayan
The semaphore 'sem' in isert_device is used as completion, so convert it to struct completion. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/ulp/isert/ib_isert.c | 6 +++--- drivers/infiniband/ulp/isert/ib_isert.h | 3 ++- 2 files

[PATCH v3 0/9] infiniband: Remove semaphores

2016-10-26 Thread Binoy Jayan
/hns: Restructure hns_roce_cmd.c to manage free_head IB/core: Convert completion to wait_event IB/mlx5: Simplify completion into a wait_event Thanks, Binoy Binoy Jayan (9): IB/core: iwpm_nlmsg_request: Replace semaphore with completion IB/core: Replace semaphore sm_sem with an atomic wait

Re: [RFC PATCH v2] crypto: Add IV generation algorithms

2017-01-01 Thread Binoy Jayan
Hi Herbert, On 30 December 2016 at 15:57, Herbert Xu wrote: > This is just a matter of structuring the key for the IV generator. > The IV generator's key in this case should be a combination of the > key to the underlying CBC plus the set of all keys for the IV > generator itself. It should the

Re: [RFC PATCH v2] crypto: Add IV generation algorithms

2017-01-01 Thread Binoy Jayan
On 2 January 2017 at 12:23, Herbert Xu wrote: > On Mon, Jan 02, 2017 at 12:16:45PM +0530, Binoy Jayan wrote: >> >> Even if ciphers are allocated this way, all the encryption requests >> for cbc should still go through IV generators? So that should mean, >> create o

Re: [RFC PATCH v2] crypto: Add IV generation algorithms

2017-01-03 Thread Binoy Jayan
Hi Gilad, On 3 January 2017 at 19:53, Gilad Ben-Yossef wrote: > Good idea. I wanted to test the patch but alas it does not apply cleanly. > You seem to have a blank line at the end of files and other small > transgressions that makes checkpatch grumpy. I think that is because there were some key

[RFC PATCH v2] crypto: Add IV generation algorithms

2016-12-13 Thread Binoy Jayan
from dm layer, each cipher instance set with a unique subkey (part of the bigger master key) and these instances themselves do not have access to each other's instances or contexts. This way, a single instance cannot encryt/decrypt a whole bio. This has to be fixed. Not-signed-off-by: Binoy

[RFC PATCH v2] IV Generation algorithms for dm-crypt

2016-12-13 Thread Binoy Jayan
count=1 cat out.txt mkfs.ext4 -j /dev/mapper/crypt_fun # Mount if fs creation succeeds mount -t ext4 /dev/mapper/crypt_fun /mnt <-- Use the encrypted file system --> umount /mnt cryptsetup luksClose crypt_fun cryptsetup luksRemoveKey /dev/sdb This seems to work well. The file system

Re: [RFC PATCH v2] crypto: Add IV generation algorithms

2016-12-13 Thread Binoy Jayan
Hi Milan, Thank you for the reply. On 13 December 2016 at 15:31, Milan Broz wrote: > I really do not think the disk encryption key management should be moved > outside of dm-crypt. We cannot then change key structure later easily. Yes, I agree. but the key selection based on sector number rest

Re: [RFC PATCH v2] crypto: Add IV generation algorithms

2016-12-29 Thread Binoy Jayan
crypt: add ability to use keys from the kernel key retention service On Thu, Dec 22, 2016 at 04:25:12PM +0530, Binoy Jayan wrote: > > > It doesn't have to live outside of dm-crypt. You can register > > these IV generators from there if you really want. > > Sorry, but I didn&

Re: [RFC PATCH v2] crypto: Add IV generation algorithms

2016-12-15 Thread Binoy Jayan
Hi Milan, On 13 December 2016 at 15:31, Milan Broz wrote: > I think that IV generators should not modify or read encrypted data directly, > it should only generate IV. I was trying to find more information about what you said and how a iv generator should be written. I saw two examples of IV ge

Re: [RFC PATCH] crypto: Add IV generation algorithms

2016-11-28 Thread Binoy Jayan
On 28 November 2016 at 18:17, Herbert Xu wrote: > On Mon, Nov 21, 2016 at 03:40:09PM +0530, Binoy Jayan wrote: >> Currently, the iv generation algorithms are implemented in dm-crypt.c. >> The goal is to move these algorithms from the dm layer to the kernel >> crypto layer by

Re: [RFC PATCH] crypto: Add IV generation algorithms

2016-11-28 Thread Binoy Jayan
Hi Herbert, On 29 November 2016 at 12:58, Herbert Xu wrote: > But that begs the question, who is supposed to use crypto_geniv_set_ctx? > I thought it was dm-crypt but your patch doesn't contain any uses > of it at all. No one is using it as of now. It was just a thought to pass context informati

[PATCH v5 1/9] IB/core: iwpm_nlmsg_request: Replace semaphore with completion

2016-11-20 Thread Binoy Jayan
Semaphore sem in iwpm_nlmsg_request is used as completion, so convert it to a struct completion type. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/core/iwpm_msg.c | 8 drivers/infiniband/core/iwpm_util.c | 7 +++ drivers/infiniband

[PATCH v5 0/9] infiniband: Remove semaphores

2016-11-20 Thread Binoy Jayan
unting semaphore event_sem with wait condition IB/mthca: Replace counting semaphore event_sem with wait condition IB/mlx5: Replace counting semaphore sem with wait condition Thanks, Binoy Binoy Jayan (9): IB/core: iwpm_nlmsg_request: Replace semaphore with completion IB/core: Replace semap

[PATCH v5 9/9] IB/mlx5: Replace semaphore umr_common:sem with wait_event

2016-11-20 Thread Binoy Jayan
Remove semaphore umr_common:sem used to limit concurrent access to umr qp and introduce an atomic value 'users' to keep track of the same. Use a wait_event to block when the limit is reached. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/main.c| 6 +- drivers/inf

[PATCH v5 3/9] IB/hns: Replace semaphore poll_sem with mutex

2016-11-20 Thread Binoy Jayan
The semaphore 'poll_sem' is a simple mutex, so it should be written as one. Semaphores are going away in the future. So replace it with a mutex. Also, remove mutex_[un]lock from mthca_cmd_use_events and mthca_cmd_use_polling respectively. Signed-off-by: Binoy Jayan --- drivers/infinib

[PATCH v5 6/9] IB/hns: Replace counting semaphore event_sem with wait_event

2016-11-20 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore mthca_cmd::event_sem with a conditional wait_event. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 46 - drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- 2

[PATCH v5 7/9] IB/mthca: Replace counting semaphore event_sem with wait_event

2016-11-20 Thread Binoy Jayan
Counting semaphores are going away in the future, so replace the semaphore mthca_cmd::event_sem with a conditional wait_event. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mthca/mthca_cmd.c | 47 ++--- drivers/infiniband/hw/mthca/mthca_dev.h | 3 ++- 2 files

[PATCH v5 8/9] IB/mlx5: Add helper mlx5_ib_post_send_wait

2016-11-20 Thread Binoy Jayan
the semaphore, which can then be rewritten to use something else. Signed-off-by: Binoy Jayan --- drivers/infiniband/hw/mlx5/mr.c | 115 +++- 1 file changed, 32 insertions(+), 83 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/h

[PATCH v5 4/9] IB/mthca: Replace semaphore poll_sem with mutex

2016-11-20 Thread Binoy Jayan
The semaphore 'poll_sem' is a simple mutex, so it should be written as one. Semaphores are going away in the future. So replace it with a mutex. Also, remove mutex_[un]lock from mthca_cmd_use_events and mthca_cmd_use_polling respectively. Signed-off-by: Binoy Jayan --- drivers/inf

[PATCH v5 5/9] IB/isert: Replace semaphore sem with completion

2016-11-20 Thread Binoy Jayan
t isert_np-pending in the same order in which they were enqueued (FIFO). So, convert it to struct completion. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/ulp/isert/ib_isert.c | 6 +++--- drivers/infiniband/ulp/isert/ib_isert.h | 3 ++- 2 files changed, 5

[PATCH v5 2/9] IB/core: Replace semaphore sm_sem with an atomic wait

2016-11-20 Thread Binoy Jayan
The semaphore 'sm_sem' is used for an exclusive ownership of the device so model the same as an atomic variable with an associated wait_event. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/infiniband/core/user_mad.c | 20 ++-- 1 file c

[RFC PATCH] IV Generation algorithms for dm-crypt

2016-11-21 Thread Binoy Jayan
ext4 /dev/mapper/crypt_fun /mnt <-- Use the encrypted file system --> umount /mnt cryptsetup luksClose crypt_fun cryptsetup luksRemoveKey /dev/sdb This seems to work well. The file system mounts successfully and the files written to in the file system remain persistent across reboots. Bino

[RFC PATCH] crypto: Add IV generation algorithms

2016-11-21 Thread Binoy Jayan
and tcw. These templates are to be configured and has to be invoked as: crypto_alloc_skcipher("plain(cbc(aes))", 0, 0); crypto_alloc_skcipher("essiv(cbc(aes))", 0, 0); ... from the dm layer. Signed-off-by: Binoy Jayan --- crypto/Kconfig|8 + crypto/Makef

Re: [RFC PATCH v4] IV Generation algorithms for dm-crypt

2017-03-20 Thread Binoy Jayan
On 6 March 2017 at 20:08, Gilad Ben-Yossef wrote: > > I gave it a spin on a x86_64 with 8 CPUs with AES-NI using cryptd and > on Arm using CryptoCell hardware accelerator. > > There was no difference in performance between 512 and 4096 bytes > cluster size on the x86_64 (800 MB loop file system)

Re: [PATCH v4 10/10] IB/mlx5: Simplify completion into a wait_event

2016-11-02 Thread Binoy Jayan
Hi, On 31 October 2016 at 02:47, Sagi Grimberg wrote: > How is this simpler? It is simpler in the sense that it is a light weight primitive and that only one thread waits on the event here. In our case since 'umr_context.done' is an "on stack" variable, and has only one thread waiting on that e

Re: [PATCH v4 10/10] IB/mlx5: Simplify completion into a wait_event

2016-11-06 Thread Binoy Jayan
Hi Linus, On 3 November 2016 at 21:07, Linus Torvalds wrote: > This is wrong. Will change it back. > Since that "umr_context" variable is on the stack, and you are waiting > for it to be fully done, it really should be a completion. Thank you for sharing your insight with wait_event and comple

Re: [RFC PATCH v4] IV Generation algorithms for dm-crypt

2017-02-21 Thread Binoy Jayan
Hi Herbert, On 8 February 2017 at 13:02, Gilad Ben-Yossef wrote: > On Tue, Feb 7, 2017 at 12:35 PM, Binoy Jayan wrote: >> === >> dm-crypt optimization for lar

[RFC PATCH v4] IV Generation algorithms for dm-crypt

2017-02-07 Thread Binoy Jayan
s are processed sequentially. Asynchronous requests are processed in parallel and is freed in the async callback. 4. Changed allocation for sub-requests using mempool v1 --> v2 -- 1. dm-crypt changes to process larger block sizes (one segment in a bio) 2. Incorporated changes w

[RFC PATCH v4] crypto: Add IV generation algorithms

2017-02-07 Thread Binoy Jayan
ude/crypto/geniv.h Signed-off-by: Binoy Jayan --- drivers/md/dm-crypt.c | 1894 ++-- include/crypto/geniv.h | 47 ++ 2 files changed, 1402 insertions(+), 539 deletions(-) create mode 100644 include/crypto/geniv.h diff --git a/drivers/md/dm-crypt.c b/dri

Re: [RFC PATCH v4] IV Generation algorithms for dm-crypt

2017-02-09 Thread Binoy Jayan
On 8 February 2017 at 13:02, Gilad Ben-Yossef wrote: > > Ran Bonnie++ on it last night (Luks mode, plain64, Qemu Virt platform > Arm64) and it works just fine. > > Tested-by: Gilad Ben-Yossef > Hi Gilad, Thank you for testing it. Do you have access to a device having crypto hardware with IV ge

[PATCH v3 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF ***

2016-08-28 Thread Binoy Jayan
sure if this is needed 2. Latency histograms - process wakeup latency Binoy Binoy Jayan (2): tracing: Add trace_irqsoff tracepoints tracing: Histogram for missed timer offsets Daniel Wagner (1): tracing: Deference pointers without RCU checks include/linux/hrtimer.h | 3

[PATCH v3 2/3] tracing: Add trace_irqsoff tracepoints

2016-08-29 Thread Binoy Jayan
rt.git/commit/?h=v3.14-rt-rebase&id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb Signed-off-by: Binoy Jayan --- include/trace/events/latency.h | 37 ++ kernel/trace/trace_irqsoff.c | 45 +- 2 files changed, 81 insertions(+), 1

[PATCH v3 1/3] tracing: Deference pointers without RCU checks

2016-08-29 Thread Binoy Jayan
o avoid this is by disabling the consistency checks. We also need to take care of the iterating in trace_events_trigger.c to avoid a splatter in conjunction with the hist trigger. Signed-off-by: Daniel Wagner Signed-off-by: Binoy Jayan --- include/linux/rculist.

[PATCH v3 3/3] tracing: Histogram for missed timer offsets

2016-08-29 Thread Binoy Jayan
'hist:key=common_pid.execname,cpu:val=toffset,hitcount' Signed-off-by: Binoy Jayan --- include/linux/hrtimer.h| 3 +++ include/trace/events/latency.h | 31 +++ kernel/time/hrtimer.c | 39 +++ 3 files changed, 73

Re: [PATCH v3 2/3] tracing: Add trace_irqsoff tracepoints

2016-08-30 Thread Binoy Jayan
On 29 August 2016 at 15:13, Daniel Wagner wrote: > Hi Binoy, > > Some minor nitpicking. > > As Steven already pointed out, the cpu field is available in all traces. > It's one of the predefined fields (see > kernel/trace/trace_events.c/trace_define_generic_fields()). Just drop it. > Hi Daniel, T

[PATCH v4 1/3] tracing: Deference pointers without RCU checks

2016-08-30 Thread Binoy Jayan
o avoid this is by disabling the consistency checks. We also need to take care of the iterating in trace_events_trigger.c to avoid a splatter in conjunction with the hist trigger. Signed-off-by: Daniel Wagner Signed-off-by: Binoy Jayan --- include/linux/rculist.

[PATCH v4 2/3] tracing: Add trace_irqsoff tracepoints

2016-08-30 Thread Binoy Jayan
-stable-rt.git/commit/?h=v3.14-rt-rebase&id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb Signed-off-by: Binoy Jayan --- include/trace/events/latency.h | 35 +++ kernel/trace/trace_irqsoff.c | 42 ++ 2 files changed, 77

[PATCH v4 0/3] *** Latency histograms - IRQSOFF,PREEMPTOFF ***

2016-08-30 Thread Binoy Jayan
t/hist Changes from v3 as per comments from Daniel - A few coding style changes - Dropped the field 'cpu' from the event format fields. TODO: 1. perf interface. Not sure if this is needed 2. Latency histograms - process wakeup latency Binoy Binoy Jayan (2): tracing: Add trace_ir

[PATCH v4 3/3] tracing: Histogram for missed timer offsets

2016-08-30 Thread Binoy Jayan
'hist:key=common_pid.execname:val=toffset,hitcount' Signed-off-by: Binoy Jayan --- include/linux/hrtimer.h| 3 +++ include/trace/events/latency.h | 29 + kernel/time/hrtimer.c | 40 3 files changed, 72 inser

Re: [PATCH v4 2/3] tracing: Add trace_irqsoff tracepoints

2016-08-30 Thread Binoy Jayan
Hi Daniel, On 30 August 2016 at 17:00, Daniel Wagner wrote: > Hi Binoy, > > > As Masami has pointed out, the prefix trace_ should not be used. Also having > trace_latency_ and latency_trace_ is kind of confusing. What about > {start|stop}_latency_timing()? It would match the existing > {start|sto

[PATCH 0/2] *** r8723au: Replace semaphore lock with mutex ***

2016-06-08 Thread Binoy Jayan
: R8723AU "Realtek RTL8723AU Wireless LAN NIC driver" Thanks, Binoy Binoy Jayan (2): staging: r8723au: pwrctrl_priv: Replace semaphore lock with mutex staging: r8723au: Remove unused semaphores drivers/staging/rtl8723au/core/rtw_pwrctrl.c | 11 ++- drivers/staging/rtl8

[PATCH 2/2] staging: r8723au: Remove unused semaphores

2016-06-08 Thread Binoy Jayan
The semaphores xmit_sema, terminate_xmitthread_sema, tx_retevt and io_req have no users, hence remove all references to them. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/rtl8723au/core/rtw_xmit.c | 4 drivers/staging/rtl8723au/include

[PATCH 1/2] staging: r8723au: pwrctrl_priv: Replace semaphore lock with mutex

2016-06-08 Thread Binoy Jayan
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/rtl8723au/core/rtw_pwrctrl.c| 11 ++- drivers/staging/rtl8723au/include/rtw_pwrctrl.h | 3 ++

[PATCH 0/2] *** staging: lustre: Replace semaphore lock with mutex ***

2016-06-08 Thread Binoy Jayan
Hi, These are a set of patches which removes semaphores from: drivers/staging/lustre (lnet) These are part of a bigger effort to eliminate all semaphores from the linux kernel. They build correctly (individually and as a whole). Thanks, Binoy Binoy Jayan (2): staging: lustre

[PATCH 1/2] staging: lustre: lloop_device: Replace semaphore lo_sem with completion

2016-06-08 Thread Binoy Jayan
The semaphore 'lo_sem' in lloop_device is used as completion, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/lustre/lustre/llite/lloop.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) di

[PATCH 2/2] staging: lustre: lnet: Replace semaphore ln_rc_signal with completion

2016-06-08 Thread Binoy Jayan
The semaphore ln_rc_signal is used as completion, so convert it to struct completion. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/lustre/include/linux/lnet/lib-types.h | 3 ++- drivers/staging/lustre/lnet/lnet/router.c | 9 + 2

[PATCH 0/3] *** Latency trace events - irqs, preempt, critical timing ***

2016-08-18 Thread Binoy Jayan
p latency and missed timer offsets are configured and enabled, a third histogram may be enabled that records the overall latency as a sum of the timer latency, if any, and the wakeup latency. This histogram is called "timerandwakeup". I will be working on the above points while some

[PATCH 3/3] tracing: Histogram for missed timer offsets

2016-08-18 Thread Binoy Jayan
'hist:key=common_pid.execname,cpu:val=toffset,hitcount' Signed-off-by: Binoy Jayan --- include/linux/hrtimer.h| 1 + include/trace/events/latency.h | 31 +++ kernel/time/hrtimer.c | 27 +++ 3 files changed, 59 insertions(+)

[PATCH 1/3] tracing: Deference pointers without RCU checks

2016-08-18 Thread Binoy Jayan
o avoid this is by disabling the consistency checks. We also need to take care of the iterating in trace_events_trigger.c to avoid a splatter in conjunction with the hist trigger. Not for inclusion! Not-Signed-off-by: Daniel Wagner Not-Signed-off-by: Binoy Jayan --- include/linux/rculist.

[PATCH 2/3] tracing: Add trace_irqsoff tracepoints

2016-08-18 Thread Binoy Jayan
has to be captured to calculate the effective latencies introduced for individual processes. Initial work - latency.patch [1] https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit/?h=v3.14-rt-rebase&id=56d50cc34943bbba12b8c5942ee1ae3b29f73acb Signed-off-by: Binoy Jayan -

[PATCH 1/7] staging: wilc1000: Replace semaphore txq_event with completion

2016-06-13 Thread Binoy Jayan
The semaphore 'txq_event' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/linux_wlan.c | 8 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 3 ++- drivers/staging/wilc1000/wilc_wlan.c

[PATCH 2/7] staging: wilc1000: Replace semaphore txq_add_to_head_cs with mutex

2016-06-13 Thread Binoy Jayan
The semaphore 'txq_add_to_head_cs' is a simple mutex, so it should be written as one. Semaphores are going away in the future. Also, removing the timeout scenario as the error handling code does not propagate the timeout properly. Signed-off-by: Binoy Jayan --- drivers/stagin

[PATCH 0/7] *** staging: wilc1000: Replace semaphores with mutexes or completions ***

2016-06-13 Thread Binoy Jayan
Hi, These are a set of patches which removes semaphores from: drivers/staging/wilc1000 These are part of a bigger effort to eliminate all semaphores from the linux kernel. They build correctly (individually and as a whole). NB: The changes are untested Thanks, Binoy Binoy Jayan (7

[PATCH 3/7] staging: wilc1000: Replace semaphore cfg_event with completion

2016-06-13 Thread Binoy Jayan
The semaphore 'cfg_event' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- drivers/staging/wilc1000/wilc_wlan.c

[PATCH 4/7] staging: wilc1000: Replace semaphore sync_event with completion

2016-06-13 Thread Binoy Jayan
The semaphore 'sync_event' is used as completion, so convert it to a struct completion type. Also, return -ETIME if the return value of wait_for_completion_timeout is 0. Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/linux_wlan.c | 10 +- drivers/stagin

[PATCH 7/7] staging: wilc1000: Remove unused inclusion of semaphore header

2016-06-13 Thread Binoy Jayan
Remove unused inclusions of semaphore header and remove the same from the todo list. Also remove the now unused wrapper 'wilc_lock_timeout'. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/TODO | 1 - drivers/stagin

[PATCH 6/7] staging: wilc1000: message_queue: Replace semaphore sem with completion

2016-06-13 Thread Binoy Jayan
The semaphore 'sem' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/wilc_msgqueue.c | 13 +++-- drivers/staging/wilc1000/wilc_msgqueue.h | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) di

[PATCH 5/7] staging: wilc1000: Replace semaphore close_exit_sync with completion

2016-06-13 Thread Binoy Jayan
The semaphore 'close_exit_sync' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan --- drivers/staging/wilc1000/linux_wlan.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c

[PATCH] staging: gdm724x: Replace semaphore netlink with mutex

2016-06-13 Thread Binoy Jayan
Replace semaphore netlink_mutex with mutex. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/gdm724x/netlink_k.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/staging/gdm724x/netlink_k.c b/drivers/staging

Re: [PATCH 0/7] *** staging: wilc1000: Replace semaphores with mutexes or completions ***

2016-06-13 Thread Binoy Jayan
On 13 June 2016 at 19:59, Arnd Bergmann wrote: > On Monday, June 13, 2016 4:07:32 PM CEST Binoy Jayan wrote: >> Hi, >> >> These are a set of patches which removes semaphores from: >> >> drivers/staging/wilc1000 >> >> These are part of a bigger effort

[PATCH 4/4] rtl8188eu: Remove unused semaphores

2016-06-03 Thread Binoy Jayan
The semaphores xmit_sema, terminate_xmitthread_sema and tx_retevt have no users, hence remove all references to them. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex drivers/staging/rtl8188eu/core/

[PATCH 1/4] irtl8188eu: Replace semaphore cmd_queue_sema with completion

2016-06-03 Thread Binoy Jayan
The semaphore 'cmd_queue_sema' is used as completion, so convert it to struct completion. Signed-off-by: Binoy Jayan --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 6 +++--- drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 2 +

[PATCH 3/4] rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex

2016-06-03 Thread Binoy Jayan
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock, _exit_pwrlock and _rtw_down_sema. Signed-off-by: Binoy Jayan --- This patch depe

[PATCH 0/4] *** rtl8188eu: Replace semaphores with mutexes or completions ***

2016-06-03 Thread Binoy Jayan
: "Realtek RTL8188EU Wireless LAN NIC driver" Thanks, Binoy Binoy Jayan (4): irtl8188eu: Replace semaphore cmd_queue_sema with completion rtl8188eu: Replace semaphore terminate_cmdthread_sema with completion rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex

[PATCH 2/4] rtl8188eu: Replace semaphore terminate_cmdthread_sema with completion

2016-06-03 Thread Binoy Jayan
The semaphore 'terminate_cmdthread_sema' is used as completion, so convert it to struct completion. Signed-off-by: Binoy Jayan --- This patch depends on the following patch: irtl8188eu: Replace semaphore cmd_queue_sema with completion drivers/staging/rtl8188eu/core/rtw_cm

[PATCH v2 4/4] rtl8188eu: Remove unused semaphores

2016-06-05 Thread Binoy Jayan
The semaphores xmit_sema, terminate_xmitthread_sema and tx_retevt have no users, hence remove all references to them. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/rtl8188eu/core/rtw_xmit.c | 4 drivers/staging/rtl8188eu/include/osdep_service.h | 1

[PATCH v2 0/4] *** rtl8188eu: Replace semaphores with mutexes or completions ***

2016-06-05 Thread Binoy Jayan
hardware: "Realtek RTL8188EU Wireless LAN NIC driver" Incorporated changes w.r.t. review comments: - Changed changelog in patch 3/4 Thanks, Binoy Binoy Jayan (4): irtl8188eu: Replace semaphore cmd_queue_sema with completion rtl8188eu: Replace semaphore terminate_cmdthread_sema with

[PATCH v2 2/4] rtl8188eu: Replace semaphore terminate_cmdthread_sema with completion

2016-06-05 Thread Binoy Jayan
The semaphore 'terminate_cmdthread_sema' is used as completion, so convert it to struct completion. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 6 +++--- drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +- drivers/staging

[PATCH v2 1/4] irtl8188eu: Replace semaphore cmd_queue_sema with completion

2016-06-05 Thread Binoy Jayan
The semaphore 'cmd_queue_sema' is used as completion, so convert it to struct completion. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 6 +++--- drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +- drivers/staging/rtl818

[PATCH v2 3/4] rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex

2016-06-05 Thread Binoy Jayan
ere. Hence, using mutex_lock instead of the interruptible version. Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock, _exit_pwrlock and _rtw_down_sema. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann --- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c

[PATCH v3 3/4] staging: r8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex

2016-06-05 Thread Binoy Jayan
ere. Hence, using mutex_lock instead of the interruptible version. Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock, _exit_pwrlock and _rtw_down_sema. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Acked-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c

[PATCH v3 1/4] staging: r8188eu: Replace semaphore cmd_queue_sema with completion

2016-06-05 Thread Binoy Jayan
The semaphore 'cmd_queue_sema' is used as completion, so convert it to struct completion. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Acked-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 6 +++--- drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +

[PATCH v3 0/4] *** staging: r8188eu: Replace semaphores with mutexes or completions ***

2016-06-05 Thread Binoy Jayan
hardware: "Realtek RTL8188EU Wireless LAN NIC driver" Incorporated changes w.r.t. review comments - Changed changelog in patch 3/4 - Changed subject line to have driver name r8188eu - Removed misplaced 'i' in subject of patch 1/4 Thanks, Binoy Binoy Jayan (4): staging: r8188e

<    1   2   3   >