mm: BUG_ON with NUMA_BALANCING (kernel BUG at include/linux/swapops.h:131!)

2015-05-13 Thread Haren Myneni
Hi, I am getting BUG_ON in migration_entry_to_page() with 4.1.0-rc2 kernel on powerpc system which has 512 CPUs (64 cores - 16 nodes) and 1.6 TB memory. We can easily recreate this issue with kernel compile (make -j500). But I could not reproduce with numa_balancing=disable. [ cut he

Re: mm: BUG_ON with NUMA_BALANCING (kernel BUG at include/linux/swapops.h:131!)

2015-05-14 Thread Haren Myneni
On 5/14/15, Mel Gorman wrote: > On Wed, May 13, 2015 at 01:17:54AM -0700, Haren Myneni wrote: >> Hi, >> >> I am getting BUG_ON in migration_entry_to_page() with 4.1.0-rc2 >> kernel on powerpc system which has 512 CPUs (64 cores - 16 nodes) and >> 1.6 TB memory.

Re: mm: BUG_ON with NUMA_BALANCING (kernel BUG at include/linux/swapops.h:131!)

2015-05-18 Thread Haren Myneni
Mel, I am hitting this issue with 4.0 kernel and even with 3.19 and 3.17 kernels. I will also try with previous versions. Please let me know any suggestions on the debugging. Thanks Haren On 5/14/15, Haren Myneni wrote: > On 5/14/15, Mel Gorman wrote: >> On Wed, May 13, 2015 at 0

Re: mm: BUG_ON with NUMA_BALANCING (kernel BUG at include/linux/swapops.h:131!)

2015-05-18 Thread Haren Myneni
On 5/18/15, Mel Gorman wrote: > On Mon, May 18, 2015 at 12:32:29AM -0700, Haren Myneni wrote: >> Mel, >> I am hitting this issue with 4.0 kernel and even with 3.19 and >> 3.17 kernels. I will also try with previous versions. Please let me >> know any s

Re: [PATCH 3/3] powerpc/mm: Change the swap encoding in pte.

2015-05-29 Thread Haren Myneni
Tested this patch on 16TB system and fixed the BUG_ON issue mentioned here - https://lists.ozlabs.org/pipermail/linuxppc-dev/2015-May/128767.html I was able to reproduce this issue in all previous releases (tested from 3.14). So this patch should be also in stable tree. Acked-by: Haren Myneni

[PATCH 0/6] powerpc: SMT priority (PPR) save and restore

2012-12-06 Thread Haren Myneni
takes around extra 10 CPU cycles on average for 25 samples. Haren Myneni (6): powerpc: Move branch instruction from ACCOUNT_CPU_USER_ENTRY to caller powerpc: Enable PPR save/restore powerpc: Increase exceptions arrays in paca struct to save PPR powerpc: Define ppr in thread_struct powerpc

[PATCH 1/6] powerpc: Move branch instruction from ACCOUNT_CPU_USER_ENTRY to caller

2012-12-06 Thread Haren Myneni
exceptions. So moved this branch instruction in the caller code. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/exception-64s.h |3 ++- arch/powerpc/include/asm/ppc_asm.h |2 -- arch/powerpc/kernel/entry_64.S |3 ++- arch/powerpc/kernel/exceptions-64e.S

[PATCH 2/6] powerpc: Enable PPR save/restore

2012-12-06 Thread Haren Myneni
[PATCH 2/6] powerpc: Enable PPR save/restore SMT thread status register (PPR) is used to set thread priority. This patch enables PPR save/restore feature (CPU_FTR_HAS_PPR) on POWER7 and POWER8 systems. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/cputable.h |7 +-- 1 files

[PATCH 3/6] powerpc: Increase exceptions arrays in paca struct to save PPR

2012-12-06 Thread Haren Myneni
[PATCH 3/6] powerpc: Increase exceptions arrays in paca struct to save PPR Using paca to save user defined PPR value in the first level exception vector. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/exception-64s.h |1 + arch/powerpc/include/asm/paca.h |6 +++--- 2

[PATCH 4/6] powerpc: Define ppr in thread_struct

2012-12-06 Thread Haren Myneni
[PATCH 4/6] powerpc: Define ppr in thread_struct ppr in thread_struct is used to save PPR and restore it before process exits from kernel. This patch sets the default priority to 3 when tasks are created such that users can use 4 for higher priority tasks. Signed-off-by: Haren Myneni --- arch

[PATCH 5/6] powerpc: Macros for saving/restore PPR

2012-12-06 Thread Haren Myneni
[PATCH 5/6] powerpc: Macros for saving/restore PPR Several macros are defined for saving and restore user defined PPR value. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/exception-64s.h | 37 ++ arch/powerpc/include/asm/ppc_asm.h | 25

[PATCH 6/6] powerpc: Implement PPR save/restore

2012-12-06 Thread Haren Myneni
: Haren Myneni --- arch/powerpc/include/asm/exception-64s.h | 18 ++ arch/powerpc/kernel/entry_64.S |3 +++ arch/powerpc/kernel/exceptions-64s.S | 23 +-- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/include/asm

Re: [PATCH] powerpc: Fix audit crash due to save/restore PPR changes

2013-04-15 Thread Haren Myneni
0008010ec50dc > > Bisecting found the following patch caused it: > > commit 44e9309f1f357794b7ae93d5f3e3e6f11d2b8a7f > Author: Haren Myneni > powerpc: Implement PPR save/restore > > It was found this patch corrupted r9 when calling > SET_DEFAULT_THREAD_PPR() > &

Change MINSIGSTKSZ and SIGSTKSIZE

2014-04-12 Thread Haren Myneni
Alan, LTP test (signalstack02) is failing. This test expects -ENOMEM from kernel when passing less than stack size (passing 4095). MINSIGSTKSZ in signal.h (glibc) is changed to 4096 to support VSX changes (https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f7c399cff5bd04ee9dc117fb6b0f3

crypto/nx842: Ignore queue overflow informative error

2015-12-05 Thread Haren Myneni
NX842 coprocessor sets bit 3 if queue is overflow. It is just for information to the user. So the driver prints this informative message and ignores it. Signed-off-by: Haren Myneni diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h index 9f8402b..d1a2a2d

Re: crypto/nx842: Ignore queue overflow informative error

2015-12-11 Thread Haren Myneni
On 12/07/2015 11:34 AM, Dan Streetman wrote: > On Sun, Dec 6, 2015 at 2:46 AM, Haren Myneni wrote: >> >> NX842 coprocessor sets bit 3 if queue is overflow. It is just for >> information to the user. So the driver prints this informative message >> and ignores it. >&g

Crypto/nx842: Ignore invalid XER[S0] return error

2015-12-11 Thread Haren Myneni
] value. One of other bits (INITIATED, BUSY or REJECTED) will be returned for any given NX request. Signed-off-by: Haren Myneni diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h index 9f8402b..27e588f 100644 --- a/arch/powerpc/include/asm/icswx.h +++ b/arch/powerpc

Re: Crypto/nx842: Ignore invalid XER[S0] return error

2015-12-12 Thread Haren Myneni
On 12/12/2015 12:43 AM, Segher Boessenkool wrote: > On Fri, Dec 11, 2015 at 07:30:29PM -0800, Haren Myneni wrote: >> NX842 coprocessor sets 3rd bit in CR register with XER[S0] which is >> nothing to do with NX request. On powerpc, XER[S0] will be set if >> overflow in FPU an

Re: Crypto/nx842: Ignore invalid XER[S0] return error

2015-12-12 Thread Haren Myneni
On 12/12/2015 04:05 PM, Segher Boessenkool wrote: > On Sat, Dec 12, 2015 at 03:01:26PM -0800, Haren Myneni wrote: >> On 12/12/2015 12:43 AM, Segher Boessenkool wrote: >>> On Fri, Dec 11, 2015 at 07:30:29PM -0800, Haren Myneni wrote: >>>> NX842 coprocessor sets 3rd

[PATCH] crypto/nx842: Mask XERS0 bit in return value

2015-12-13 Thread Haren Myneni
NX842 coprocessor sets 3rd bit in CR register with XER[S0] which is nothing to do with NX request. Since this bit can be set with other valuable return status, mast this bit. One of other bits (INITIATED, BUSY or REJECTED) will be returned for any given NX request. Signed-off-by: Haren Myneni

[PATCH V2 0/9] crypto/nx: Enable GZIP engine and provide userpace API

2020-02-29 Thread Haren Myneni
essor type that VAS can support in future. Example: Fast thread wakeup feature from VAS - Rebased to 5.6-rc3 Haren Myneni (9): powerpc/vas: Initialize window attributes for GZIP coprocessor type powerpc/vas: Define VAS_TX_WIN_OPEN ioctl API powerpc/vas: Add VAS user space API

[PATCH V2 1/9] powerpc/vas: Initialize window attributes for GZIP coprocessor type

2020-02-29 Thread Haren Myneni
Initialize send and receive window attributes for GZIP high and normal priority types. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c

[PATCH V2 2/9] powerpc/vas: Define VAS_TX_WIN_OPEN ioctl API

2020-02-29 Thread Haren Myneni
Define the VAS_TX_WIN_OPEN ioctl interface for NX GZIP access from user space. This interface is used to open GZIP send window and mmap region which can be used by userspace to send requests to NX directly with copy/paste instructions. Signed-off-by: Haren Myneni --- Documentation/userspace

[PATCH V3 3/9] powerpc/vas: Add VAS user space API

2020-02-29 Thread Haren Myneni
Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 11 ++ arch/powerpc/platforms/powernv/Makefile | 2 +- arch/powerpc/platforms/powernv/vas-api.c| 290 arch/powerpc/platforms/powernv/vas-wind

[PATCH V2 4/9] crypto/nx: Initialize coproc entry with kzalloc

2020-02-29 Thread Haren Myneni
obe() Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-842-powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/nx/nx-842-powernv.c b/drivers/crypto/nx/nx-842-powernv.c index c037a24..8e63326 100644 --- a/drivers/crypto/nx/nx-842-powernv.c +++ b/driv

[PATCH V2 5/9] crypto/nx: Rename nx-842-powernv file name to nx-common-powernv

2020-02-29 Thread Haren Myneni
Rename nx-842-powernv.c to nx-common-powernv.c to add code for setup and enable new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni --- drivers/crypto/nx/Makefile|2 +- drivers/crypto/nx/nx-842-powernv.c| 1062

[PATCH V2 6/9] crypto/nx: Make enable code generic to add new GZIP compression type

2020-02-29 Thread Haren Myneni
Make setup and enable code generic to support new GZIP compression type. Changed nx842 reference to nx and moved some code to new functions. The actual functionality is not changed. Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-common-powernv.c | 159

[PATCH V2 7/9] crypto/nx: Enable and setup GZIP compression type

2020-02-29 Thread Haren Myneni
Changes to probe GZIP device-tree nodes, open RX windows and setup GZIP compression type. No plans to provide GZIP usage in kernel right now, but this patch enables GZIP for user space usage. Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-common-powernv.c | 43

[PATCH V2 8/9] crypto/nx: Remove 'pid' in vas_tx_win_attr struct

2020-02-29 Thread Haren Myneni
When window is opened, pid reference is taken for user space windows. Not needed for kernel windows. So remove 'pid' in vas_tx_win_attr struct. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h| 1 - drivers/crypto/nx/nx-common-powernv.c | 1 - 2 files

[PATCH V2 9/9] Documentation/powerpc: VAS API

2020-02-29 Thread Haren Myneni
-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- Documentation/powerpc/index.rst | 1 + Documentation/powerpc/vas-api.rst | 246 ++ 2 files changed, 247 insertions(+) create mode 100644 Documentation/powerpc/vas-api.rst diff --git a

[PATCH V6 00/14] powerpc/vas: Page fault handling for user space NX requests

2020-03-04 Thread Haren Myneni
nd CCW[0] bit to find valid CRB in fault FIFO (Patch6). - Return fault address to user space in BE and other changes as suggested by Michael Neuling. (patch9) - Rebased to 5.6-rc4 Haren Myneni (14): powerpc/xive: Define xive_native_alloc_irq_on_chip() powerpc/xive

[PATCH V6 01/14] powerpc/xive: Define xive_native_alloc_irq_on_chip()

2020-03-04 Thread Haren Myneni
This function allocates IRQ on a specific chip. VAS needs per chip IRQ allocation and will have IRQ handler per VAS instance. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/xive.h | 9 - arch/powerpc/sysdev/xive/native.c | 6 +++--- 2 files changed, 11 insertions(+), 4

[PATCH V6 02/14] powerpc/xive: Define xive_native_alloc_get_irq_info()

2020-03-04 Thread Haren Myneni
pnv_ocxl_alloc_xive_irq() in ocxl.c allocates IRQ and gets trigger port address. VAS also needs this function, but based on chip ID. So moved this common function to xive/native.c. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/xive.h | 2 ++ arch/powerpc/platforms/powernv

[PATCH V6 03/14] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block

2020-03-04 Thread Haren Myneni
: Haren Myneni --- arch/powerpc/include/asm/icswx.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h index 9872f85..b233d1e 100644 --- a/arch/powerpc/include/asm/icswx.h +++ b/arch/powerpc/include

[PATCH V6 04/14] powerpc/vas: Alloc and setup IRQ and trigger port address

2020-03-04 Thread Haren Myneni
Alloc IRQ and get trigger port address for each VAS instance. Kernel register this IRQ per VAS instance and sets this port for each send window. NX interrupts the kernel when it sees page fault. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas.c | 34

[PATCH V6 05/14] powerpc/vas: Setup fault window per VAS instance

2020-03-04 Thread Haren Myneni
Setup fault window for each VAS instance. When NX gets a fault on request buffer, write fault CRBs in the corresponding fault FIFO and then sends an interrupt to the OS. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/Makefile | 2

[PATCH V6 06/14] powerpc/vas: Setup thread IRQ handler per VAS instance

2020-03-04 Thread Haren Myneni
: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 90 + arch/powerpc/platforms/powernv/vas-window.c | 60 +++ arch/powerpc/platforms/powernv/vas.c| 49 +++- arch/powerpc/platforms/powernv

[PATCH V6 07/14] powerpc/vas: Register NX with fault window ID and IRQ port value

2020-03-04 Thread Haren Myneni
For each user space send window, register NX with fault window ID and port value so that NX paste CRBs in this fault FIFO when it sees fault on the request buffer. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 15

[PATCH V6 08/14] powerpc/vas: Take reference to PID and mm for user space windows

2020-03-04 Thread Haren Myneni
its parent. To prevent reusing the pid until the window closed, take reference to pid and task mm. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-debug.c | 2 +- arch/powerpc/platforms/powernv/vas-window.c | 53 ++--- arch/powerpc/platforms/powernv

[PATCH V6 10/14] powerpc/vas: Print CRB and FIFO values

2020-03-04 Thread Haren Myneni
Dump FIFO entries if could not find send window and print CRB for debugging. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/arch/powerpc

[PATCH V6 11/14] powerpc/vas: Do not use default credits for receive window

2020-03-04 Thread Haren Myneni
System checkstops if RxFIFO overruns with more requests than the maximum possible number of CRBs allowed in FIFO at any time. So max credits value (rxattr.wcreds_max) is set and is passed to vas_rx_win_open() by the the driver. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv

[PATCH V6 09/14] powerpc/vas: Update CSB and notify process for fault CRBs

2020-03-04 Thread Haren Myneni
Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 114 + 1 file changed, 114 insertions(+) diff --git a/arch/powerpc/platforms/powernv/vas-fault.c b/arch/powerpc/platforms/powernv/vas-fault.c index 85e4280..c79fdbd 100644 --- a/arch/powerpc

[PATCH V6 12/14] powerpc/vas: Return credits after handling fault

2020-03-04 Thread Haren Myneni
NX expects OS to return credit for send window after processing each fault. Also credit has to be returned even for fault window. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 9 + arch/powerpc/platforms/powernv/vas

[PATCH V6 13/14] powerpc/vas: Display process stuck message

2020-03-04 Thread Haren Myneni
Process can not close send window until all requests are processed. Means wait until window state is not busy and send credits are returned. Display debug messages in case taking longer to close the window. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 28

[PATCH V6 14/14] powerpc/vas: Free send window in VAS instance after credits returned

2020-03-04 Thread Haren Myneni
NX may be processing requests while trying to close window. Wait until all credits are returned and then free send window from VAS instance. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH V7 00/14] powerpc/vas: Page fault handling for user space NX requests

2020-03-06 Thread Haren Myneni
nd CCW[0] bit to find valid CRB in fault FIFO (Patch6). - Return fault address to user space in BE and other changes as suggested by Michael Neuling. (patch9) - Rebased to 5.6-rc4 V7: - Fix sparse warnings (patches 6,9 and 10) Haren Myneni (14): powerpc/xive

[PATCH V7 01/14] powerpc/xive: Define xive_native_alloc_irq_on_chip()

2020-03-06 Thread Haren Myneni
This function allocates IRQ on a specific chip. VAS needs per chip IRQ allocation and will have IRQ handler per VAS instance. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/xive.h | 9 - arch/powerpc/sysdev/xive/native.c | 6 +++--- 2 files changed, 11 insertions(+), 4

[PATCH V7 02/14] powerpc/xive: Define xive_native_alloc_get_irq_info()

2020-03-06 Thread Haren Myneni
pnv_ocxl_alloc_xive_irq() in ocxl.c allocates IRQ and gets trigger port address. VAS also needs this function, but based on chip ID. So moved this common function to xive/native.c. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/xive.h | 2 ++ arch/powerpc/platforms/powernv

[PATCH V7 03/14] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block

2020-03-06 Thread Haren Myneni
: Haren Myneni --- arch/powerpc/include/asm/icswx.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h index 9872f85..b233d1e 100644 --- a/arch/powerpc/include/asm/icswx.h +++ b/arch/powerpc/include

[PATCH V7 04/14] powerpc/vas: Alloc and setup IRQ and trigger port address

2020-03-06 Thread Haren Myneni
Alloc IRQ and get trigger port address for each VAS instance. Kernel register this IRQ per VAS instance and sets this port for each send window. NX interrupts the kernel when it sees page fault. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas.c | 34

[PATCH V7 05/14] powerpc/vas: Setup fault window per VAS instance

2020-03-06 Thread Haren Myneni
Setup fault window for each VAS instance. When NX gets a fault on request buffer, write fault CRBs in the corresponding fault FIFO and then sends an interrupt to the OS. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/Makefile | 2

[PATCH V7 06/14] powerpc/vas: Setup thread IRQ handler per VAS instance

2020-03-06 Thread Haren Myneni
: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 90 + arch/powerpc/platforms/powernv/vas-window.c | 60 +++ arch/powerpc/platforms/powernv/vas.c| 49 +++- arch/powerpc/platforms/powernv

[PATCH V7 07/14] powerpc/vas: Register NX with fault window ID and IRQ port value

2020-03-06 Thread Haren Myneni
For each user space send window, register NX with fault window ID and port value so that NX paste CRBs in this fault FIFO when it sees fault on the request buffer. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 15

[PATCH V7 08/14] powerpc/vas: Take reference to PID and mm for user space windows

2020-03-06 Thread Haren Myneni
its parent. To prevent reusing the pid until the window closed, take reference to pid and task mm. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-debug.c | 2 +- arch/powerpc/platforms/powernv/vas-window.c | 53 ++--- arch/powerpc/platforms/powernv

[PATCH V7 09/14] powerpc/vas: Update CSB and notify process for fault CRBs

2020-03-06 Thread Haren Myneni
Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 114 + 1 file changed, 114 insertions(+) diff --git a/arch/powerpc/platforms/powernv/vas-fault.c b/arch/powerpc/platforms/powernv/vas-fault.c index 1c6d5cc..751ce48 100644 --- a/arch/powerpc

[PATCH V7 10/14] powerpc/vas: Print CRB and FIFO values

2020-03-06 Thread Haren Myneni
Dump FIFO entries if could not find send window and print CRB for debugging. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/arch/powerpc

[PATCH V7 11/14] powerpc/vas: Do not use default credits for receive window

2020-03-06 Thread Haren Myneni
System checkstops if RxFIFO overruns with more requests than the maximum possible number of CRBs allowed in FIFO at any time. So max credits value (rxattr.wcreds_max) is set and is passed to vas_rx_win_open() by the the driver. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv

[PATCH V7 12/14] powerpc/vas: Return credits after handling fault

2020-03-06 Thread Haren Myneni
NX expects OS to return credit for send window after processing each fault. Also credit has to be returned even for fault window. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 9 + arch/powerpc/platforms/powernv/vas

[PATCH V7 14/14] powerpc/vas: Free send window in VAS instance after credits returned

2020-03-06 Thread Haren Myneni
NX may be processing requests while trying to close window. Wait until all credits are returned and then free send window from VAS instance. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH V7 13/14] powerpc/vas: Display process stuck message

2020-03-06 Thread Haren Myneni
Process can not close send window until all requests are processed. Means wait until window state is not busy and send credits are returned. Display debug messages in case taking longer to close the window. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 28

[PATCH v3 0/9] crypto/nx: Enable GZIP engine and provide userpace API

2020-03-06 Thread Haren Myneni
essor type that VAS can support in future. Example: Fast thread wakeup feature from VAS - Rebased to 5.6-rc3 V3: - Fix sparse warnings (patches 3&6) Haren Myneni (9): powerpc/vas: Initialize window attributes for GZIP coprocessor type powerpc/vas: Define VAS_TX_WIN_OPEN ioctl API

[PATCH v3 1/9] powerpc/vas: Initialize window attributes for GZIP coprocessor type

2020-03-06 Thread Haren Myneni
Initialize send and receive window attributes for GZIP high and normal priority types. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c

[PATCH v3 2/9] powerpc/vas: Define VAS_TX_WIN_OPEN ioctl API

2020-03-06 Thread Haren Myneni
Define the VAS_TX_WIN_OPEN ioctl interface for NX GZIP access from user space. This interface is used to open GZIP send window and mmap region which can be used by userspace to send requests to NX directly with copy/paste instructions. Signed-off-by: Haren Myneni --- Documentation/userspace

[PATCH v3 3/9] powerpc/vas: Add VAS user space API

2020-03-06 Thread Haren Myneni
Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 11 ++ arch/powerpc/platforms/powernv/Makefile | 2 +- arch/powerpc/platforms/powernv/vas-api.c| 290 arch/powerpc/platforms/powernv/vas-wind

[PATCH v3 4/9] crypto/nx: Initialize coproc entry with kzalloc

2020-03-06 Thread Haren Myneni
obe() Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-842-powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/nx/nx-842-powernv.c b/drivers/crypto/nx/nx-842-powernv.c index c037a24..8e63326 100644 --- a/drivers/crypto/nx/nx-842-powernv.c +++ b/driv

[PATCH v3 5/9] crypto/nx: Rename nx-842-powernv file name to nx-common-powernv

2020-03-06 Thread Haren Myneni
Rename nx-842-powernv.c to nx-common-powernv.c to add code for setup and enable new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni --- drivers/crypto/nx/Makefile|2 +- drivers/crypto/nx/nx-842-powernv.c| 1062

[PATCH v3 6/9] crypto/NX: Make enable code generic to add new GZIP compression type

2020-03-06 Thread Haren Myneni
Make setup and enable code generic to support new GZIP compression type. Changed nx842 reference to nx and moved some code to new functions. Functionality is not changed except sparse warning fix - setting NULL instead of 0 for per_cpu send window in nx_delete_coprocs(). Signed-off-by: Haren

[PATCH v3 7/9] crypto/nx: Enable and setup GZIP compresstion type

2020-03-06 Thread Haren Myneni
Changes to probe GZIP device-tree nodes, open RX windows and setup GZIP compression type. No plans to provide GZIP usage in kernel right now, but this patch enables GZIP for user space usage. Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-common-powernv.c | 43

[PATCH v3 8/9] crypto/nx: Remove 'pid' in vas_tx_win_attr struct

2020-03-06 Thread Haren Myneni
When window is opened, pid reference is taken for user space windows. Not needed for kernel windows. So remove 'pid' in vas_tx_win_attr struct. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h| 1 - drivers/crypto/nx/nx-common-powernv.c | 1 - 2 files

[PATCH v3 9/9] Documentation/powerpc: VAS API

2020-03-06 Thread Haren Myneni
-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- Documentation/powerpc/index.rst | 1 + Documentation/powerpc/vas-api.rst | 246 ++ 2 files changed, 247 insertions(+) create mode 100644 Documentation/powerpc/vas-api.rst diff --git a

Re: [PATCH 0/5] selftests/powerpc: Add NX-GZIP engine testcase

2020-03-16 Thread Haren Myneni
On Mon, 2020-03-16 at 15:07 -0300, Raphael Moreira Zinsly wrote: > This patch series are intended to test the power8 and power9 Nest > Accelerator (NX) GZIP engine that is being introduced by > https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-March/205659.html > More information about how to ac

Re: [PATCH v3 0/9] crypto/nx: Enable GZIP engine and provide userpace API

2020-03-16 Thread Haren Myneni
> > available in the above link. > > > > Thanks to Bulent Abali for nxz library and tests development. > > > > Changelog: > > V2: > > - Move user space API code to powerpc as suggested. Also this API > > can be extended to any other coprocess

Re: [PATCH V7 08/14] powerpc/vas: Take reference to PID and mm for user space windows

2020-03-17 Thread Haren Myneni
On Tue, 2020-03-17 at 15:09 +1100, Michael Ellerman wrote: > Haren Myneni writes: > > Process close windows after its requests are completed. In multi-thread > > applications, child can open a window but release FD will not be called > > upon its exit. Parent thread will be

Re: [PATCH V7 09/14] powerpc/vas: Update CSB and notify process for fault CRBs

2020-03-17 Thread Haren Myneni
On Tue, 2020-03-17 at 16:28 +1100, Michael Ellerman wrote: > Haren Myneni writes: > > For each fault CRB, update fault address in CRB (fault_storage_addr) > > and translation error status in CSB so that user space can touch the > > fault address and resend the request. If

Re: [PATCH v3 3/9] powerpc/vas: Add VAS user space API

2020-03-18 Thread Haren Myneni
On Thu, 2020-03-19 at 12:16 +1100, Daniel Axtens wrote: > Haren Myneni writes: > > > On power9, userspace can send GZIP compression requests directly to NX > > once kernel establishes NX channel / window with VAS. This patch provides > > user space API which allows

[PATCH v8 00/14] powerpc/vas: Page fault handling for user space NX requests

2020-03-18 Thread Haren Myneni
(patch8) - Move barrier before csb.flags store and add WARN_ON_ONCE() checks (patch9) Haren Myneni (14): powerpc/xive: Define xive_native_alloc_irq_on_chip() powerpc/xive: Define xive_native_alloc_get_irq_info() powerpc/vas: Define nx_fault_stamp in coprocessor_request_block powerpc/vas: A

[PATCH v8 01/14] powerpc/xive: Define xive_native_alloc_irq_on_chip()

2020-03-18 Thread Haren Myneni
This function allocates IRQ on a specific chip. VAS needs per chip IRQ allocation and will have IRQ handler per VAS instance. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/xive.h | 9 - arch/powerpc/sysdev/xive/native.c | 6 +++--- 2 files changed, 11 insertions(+), 4

[PATCH v8 02/14] powerpc/xive: Define xive_native_alloc_get_irq_info()

2020-03-18 Thread Haren Myneni
pnv_ocxl_alloc_xive_irq() in ocxl.c allocates IRQ and gets trigger port address. VAS also needs this function, but based on chip ID. So moved this common function to xive/native.c. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/xive.h | 2 ++ arch/powerpc/platforms/powernv

[PATCH v8 03/14] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block

2020-03-18 Thread Haren Myneni
: Haren Myneni --- arch/powerpc/include/asm/icswx.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/icswx.h b/arch/powerpc/include/asm/icswx.h index 9872f85..b233d1e 100644 --- a/arch/powerpc/include/asm/icswx.h +++ b/arch/powerpc/include

[PATCH v8 04/14] powerpc/vas: Alloc and setup IRQ and trigger port address

2020-03-18 Thread Haren Myneni
Alloc IRQ and get trigger port address for each VAS instance. Kernel register this IRQ per VAS instance and sets this port for each send window. NX interrupts the kernel when it sees page fault. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas.c | 34

[PATCH v8 05/14] powerpc/vas: Setup fault window per VAS instance

2020-03-18 Thread Haren Myneni
Setup fault window for each VAS instance. When NX gets a fault on request buffer, write fault CRBs in the corresponding fault FIFO and then sends an interrupt to the OS. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/Makefile | 2

[PATCH v8 06/14] powerpc/vas: Setup thread IRQ handler per VAS instance

2020-03-18 Thread Haren Myneni
: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 90 + arch/powerpc/platforms/powernv/vas-window.c | 60 +++ arch/powerpc/platforms/powernv/vas.c| 49 +++- arch/powerpc/platforms/powernv

[PATCH v8 07/14] powerpc/vas: Register NX with fault window ID and IRQ port value

2020-03-18 Thread Haren Myneni
For each user space send window, register NX with fault window ID and port value so that NX paste CRBs in this fault FIFO when it sees fault on the request buffer. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 15

[PATCH v8 08/14] powerpc/vas: Take reference to PID and mm for user space windows

2020-03-18 Thread Haren Myneni
are pending. If the csb_addr passed in these requests is invalid, kernel will end up sending signal to the wrong task. To prevent reusing the pid, take references to pid and mm when the window is opened and release them during window close. Signed-off-by: Haren Myneni --- arch/powerpc/platforms

[PATCH v8 09/14] powerpc/vas: Update CSB and notify process for fault CRBs

2020-03-18 Thread Haren Myneni
Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 115 + 1 file changed, 115 insertions(+) diff --git a/arch/powerpc/platforms/powernv/vas-fault.c b/arch/powerpc/platforms/powernv/vas-fault.c index 1c6d5cc..6eceac5d 100644 --- a/arch/powerpc

[PATCH v8 10/14] powerpc/vas: Print CRB and FIFO values

2020-03-18 Thread Haren Myneni
Dump FIFO entries if could not find send window and print CRB for debugging. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/arch/powerpc

[PATCH v8 11/14] powerpc/vas: Do not use default credits for receive window

2020-03-18 Thread Haren Myneni
System checkstops if RxFIFO overruns with more requests than the maximum possible number of CRBs allowed in FIFO at any time. So max credits value (rxattr.wcreds_max) is set and is passed to vas_rx_win_open() by the the driver. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv

[PATCH v8 12/14] powerpc/vas: Return credits after handling fault

2020-03-18 Thread Haren Myneni
NX expects OS to return credit for send window after processing each fault. Also credit has to be returned even for fault window. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 9 + arch/powerpc/platforms/powernv/vas

[PATCH v8 13/14] powerpc/vas: Display process stuck message

2020-03-18 Thread Haren Myneni
Process can not close send window until all requests are processed. Means wait until window state is not busy and send credits are returned. Display debug messages in case taking longer to close the window. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 28

[PATCH v8 14/14] powerpc/vas: Free send window in VAS instance after credits returned

2020-03-18 Thread Haren Myneni
NX may be processing requests while trying to close window. Wait until all credits are returned and then free send window from VAS instance. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

Re: [PATCH v3 3/9] powerpc/vas: Add VAS user space API

2020-03-22 Thread Haren Myneni
On Fri, 2020-03-20 at 23:18 +1100, Daniel Axtens wrote: > Haren Myneni writes: > > > On power9, userspace can send GZIP compression requests directly to NX > > once kernel establishes NX channel / window with VAS. This patch provides > > user space API which allows

Re: [PATCH v3 9/9] Documentation/powerpc: VAS API

2020-03-22 Thread Haren Myneni
to establish channel to NX for userspace. This document > > describes user space API that application can use to establish > > communication channel. > > > > Signed-off-by: Sukadev Bhattiprolu > > Signed-off-by: Haren Myneni > > --- > > Documentation/

Re: [PATCH v8 03/14] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block

2020-03-22 Thread Haren Myneni
ndles the fault mentioned in CRB by bringing the page in to > > memory and send NX request again. > > > > Signed-off-by: Sukadev Bhattiprolu > > Signed-off-by: Haren Myneni > > --- > > arch/powerpc/include/asm/icswx.h | 18 +- > > 1 file c

Re: [PATCH V7 09/14] powerpc/vas: Update CSB and notify process for fault CRBs

2020-03-22 Thread Haren Myneni
On Mon, 2020-03-23 at 10:06 +1000, Nicholas Piggin wrote: > Haren Myneni's on March 18, 2020 5:27 am: > > On Tue, 2020-03-17 at 16:28 +1100, Michael Ellerman wrote: > >> Haren Myneni writes: > >> > For each fault CRB, update fault address in CRB (fault_storage

[PATCH v4 0/9] crypto/nx: Enable GZIP engine and provide userpace API

2020-03-22 Thread Haren Myneni
paste links in VAS API documentation in patch and other changes as Daniel Axtens suggested Haren Myneni (9): powerpc/vas: Initialize window attributes for GZIP coprocessor type powerpc/vas: Define VAS_TX_WIN_OPEN ioctl API powerpc/vas: Add VAS user space API crypto/nx: Initialize coproc entry

[PATCH v4 1/9] powerpc/vas: Initialize window attributes for GZIP coprocessor type

2020-03-22 Thread Haren Myneni
Initialize send and receive window attributes for GZIP high and normal priority types. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c

[PATCH v4 2/9] powerpc/vas: Define VAS_TX_WIN_OPEN ioctl API

2020-03-22 Thread Haren Myneni
Define the VAS_TX_WIN_OPEN ioctl interface for NX GZIP access from user space. This interface is used to open GZIP send window and mmap region which can be used by userspace to send requests to NX directly with copy/paste instructions. Signed-off-by: Haren Myneni --- Documentation/userspace

[PATCH v4 3/9] powerpc/vas: Add VAS user space API

2020-03-22 Thread Haren Myneni
Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 11 ++ arch/powerpc/platforms/powernv/Makefile | 2 +- arch/powerpc/platforms/powernv/vas-api.c| 257 arch/powerpc/platforms/powernv/vas-wind

[PATCH v4 4/9] crypto/nx: Initialize coproc entry with kzalloc

2020-03-22 Thread Haren Myneni
obe() Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-842-powernv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/nx/nx-842-powernv.c b/drivers/crypto/nx/nx-842-powernv.c index c037a24..8e63326 100644 --- a/drivers/crypto/nx/nx-842-powernv.c +++ b/driv

[PATCH v4 5/9] crypto/nx: Rename nx-842-powernv file name to nx-common-powernv

2020-03-22 Thread Haren Myneni
Rename nx-842-powernv.c to nx-common-powernv.c to add code for setup and enable new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni --- drivers/crypto/nx/Makefile|2 +- drivers/crypto/nx/nx-842-powernv.c| 1062

  1   2   3   4   5   6   7   >