RE: [PATCH v5 5/7] ocxl: Expose the thread_id needed for wait on POWER9

2018-05-11 Thread Alastair D'Silva
> -Original Message- > From: Frederic Barrat <fbar...@linux.ibm.com> > Sent: Friday, 11 May 2018 7:25 PM > To: Alastair D'Silva <alast...@au1.ibm.com>; linuxppc-...@lists.ozlabs.org > Cc: linux-ker...@vger.kernel.org; linux-doc@vger.kernel.org

[PATCH v5 5/7] ocxl: Expose the thread_id needed for wait on POWER9

2018-05-11 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order to successfully issue as_notify, an AFU needs to know the TID to notify, which in turn means that this information should be available in userspace so it can be communicated to the AFU. Signed-off-by: Alastair D'Silva <alast...@d-

[PATCH v5 7/7] ocxl: Document new OCXL IOCTLs

2018-05-11 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- Documentation/accelerators/ocxl.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/accelerators/oc

[PATCH v5 4/7] ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action

2018-05-11 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The function removes the process element from NPU cache. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/pnv-ocxl.h | 2 +- arch/powerpc/platforms/powernv/ocxl.c | 4 ++-- drivers/misc

[PATCH v5 3/7] powerpc: use task_pid_nr() for TID allocation

2018-05-11 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The current implementation of TID allocation, using a global IDR, may result in an errant process starving the system of available TIDs. Instead, use task_pid_nr(), as mentioned by the original author. The scenario described which prevented it

[PATCH v5 1/7] powerpc: Add TIDR CPU feature for POWER9

2018-05-11 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> This patch adds a CPU feature bit to show whether the CPU has the TIDR register available, enabling as_notify/wait in userspace. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/cputable.h | 3 ++-

[PATCH v5 0/7] ocxl: Implement Power9 as_notify/wait for OpenCAPI

2018-05-11 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The Power 9 as_notify/wait feature provides a lower latency way to signal a thread that work is complete. This series enables the use of this feature from OpenCAPI adapters, as well as addressing a potential starvation issue when allocating thre

[PATCH v5 6/7] ocxl: Add an IOCTL so userspace knows what OCXL features are available

2018-05-11 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order for a userspace AFU driver to call the POWER9 specific OCXL_IOCTL_ENABLE_P9_WAIT, it needs to verify that it can actually make that call. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- drivers/misc/ocxl

[PATCH v5 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation

2018-05-11 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Switch the use of TIDR on it's CPU feature, rather than assuming it is available based on architecture. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/kernel/process.c | 6 +++--- 1 file changed, 3 insertions(+),

[PATCH v4 3/7] powerpc: use task_pid_nr() for TID allocation

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The current implementation of TID allocation, using a global IDR, may result in an errant process starving the system of available TIDs. Instead, use task_pid_nr(), as mentioned by the original author. The scenario described which prevented it

[PATCH v4 6/7] ocxl: Add an IOCTL so userspace knows what OCXL features are available

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order for a userspace AFU driver to call the POWER9 specific OCXL_IOCTL_ENABLE_P9_WAIT, it needs to verify that it can actually make that call. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- drivers/misc/ocxl

[PATCH v4 7/7] ocxl: Document new OCXL IOCTLs

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- Documentation/accelerators/ocxl.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/accelerators/oc

[PATCH v4 4/7] ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The function removes the process element from NPU cache. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/pnv-ocxl.h | 2 +- arch/powerpc/platforms/powernv/ocxl.c | 4 ++-- drivers/misc

[PATCH v4 5/7] ocxl: Expose the thread_id needed for wait on POWER9

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order to successfully issue as_notify, an AFU needs to know the TID to notify, which in turn means that this information should be available in userspace so it can be communicated to the AFU. Signed-off-by: Alastair D'Silva <alast...@d-

[PATCH v4 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Switch the use of TIDR on it's CPU feature, rather than assuming it is available based on architecture. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/kernel/process.c | 6 +++--- 1 file changed, 3 insertions(+),

[PATCH v4 0/7] ocxl: Implement Power9 as_notify/wait for OpenCAPI

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The Power 9 as_notify/wait feature provides a lower latency way to signal a thread that work is complete. This series enables the use of this feature from OpenCAPI adapters, as well as addressing a potential starvation issue when allocating thre

[PATCH v4 1/7] powerpc: Add TIDR CPU feature for POWER9

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> This patch adds a CPU feature bit to show whether the CPU has the TIDR register available, enabling as_notify/wait in userspace. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/cputable.h | 3 ++-

[PATCH v3 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Switch the use of TIDR on it's CPU feature, rather than assuming it is available based on architecture. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/kernel/process.c | 6 +++--- 1 file changed, 3 insertions(+),

[PATCH v3 1/7] powerpc: Add TIDR CPU feature for POWER9

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> This patch adds a CPU feature bit to show whether the CPU has the TIDR register available, enabling as_notify/wait in userspace. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/cputable.h | 3 ++-

[PATCH v3 7/7] ocxl: Document new OCXL IOCTLs

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- Documentation/accelerators/ocxl.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/accelerators/oc

[PATCH v3 0/7] ocxl: Implement Power9 as_notify/wait for OpenCAPI

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The Power 9 as_notify/wait feature provides a lower latency way to signal a thread that work is complete. This series enables the use of this feature from OpenCAPI adapters, as well as addressing a potential starvation issue when allocating thre

[PATCH v3 4/7] ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The function removes the process element from NPU cache. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/pnv-ocxl.h | 2 +- arch/powerpc/platforms/powernv/ocxl.c | 4 ++-- drivers/misc

[PATCH v3 6/7] ocxl: Add an IOCTL so userspace knows what OCXL features are available

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order for a userspace AFU driver to call the POWER9 specific OCXL_IOCTL_ENABLE_P9_WAIT, it needs to verify that it can actually make that call. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- drivers/misc/ocxl

[PATCH v3 5/7] ocxl: Expose the thread_id needed for wait on POWER9

2018-05-08 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order to successfully issue as_notify, an AFU needs to know the TID to notify, which in turn means that this information should be available in userspace so it can be communicated to the AFU. Signed-off-by: Alastair D'Silva <alast...@d-

Re: [PATCH v2 6/7] ocxl: Add an IOCTL so userspace knows what CPU features are available

2018-05-07 Thread Alastair D'Silva
On Tue, 2018-05-08 at 13:50 +1000, Nicholas Piggin wrote: > On Tue, 08 May 2018 10:41:55 +1000 > "Alastair D'Silva" <alast...@au1.ibm.com> wrote: > > > On Mon, 2018-05-07 at 20:14 +0200, Frederic Barrat wrote: > > > > > > Le 18/04/2018 à 03:08, Al

Re: [PATCH v2 1/7] powerpc: Add TIDR CPU feature for Power9

2018-05-07 Thread Alastair D'Silva
On Mon, 2018-05-07 at 19:17 +0200, Frederic Barrat wrote: > > Le 18/04/2018 à 03:08, Alastair D'Silva a écrit : > > From: Alastair D'Silva <alast...@d-silva.org> > > > > This patch adds a CPU feature bit to show whether the CPU has > > the TIDR registe

Re: [PATCH v2 6/7] ocxl: Add an IOCTL so userspace knows what CPU features are available

2018-05-07 Thread Alastair D'Silva
On Mon, 2018-05-07 at 20:14 +0200, Frederic Barrat wrote: > > Le 18/04/2018 à 03:08, Alastair D'Silva a écrit : > > From: Alastair D'Silva <alast...@d-silva.org> > > > > In order for a userspace AFU driver to call the Power9 specific > > OCXL_IOCTL_ENABLE_P9_

Re: [PATCH v2 3/7] powerpc: use task_pid_nr() for TID allocation

2018-05-07 Thread Alastair D'Silva
On Mon, 2018-05-07 at 19:37 +0200, Frederic Barrat wrote: > > Le 18/04/2018 à 03:08, Alastair D'Silva a écrit : > > From: Alastair D'Silva <alast...@d-silva.org> > > > > The current implementation of TID allocation, using a global IDR, > > may > > resul

[PATCH v2 7/7] ocxl: Document new OCXL IOCTLs

2018-04-17 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- Documentation/accelerators/ocxl.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/accelerators/oc

[PATCH v2 6/7] ocxl: Add an IOCTL so userspace knows what CPU features are available

2018-04-17 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order for a userspace AFU driver to call the Power9 specific OCXL_IOCTL_ENABLE_P9_WAIT, it needs to verify that it can actually make that call. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- Documentation/accelerators/o

[PATCH v2 5/7] ocxl: Expose the thread_id needed for wait on p9

2018-04-17 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order to successfully issue as_notify, an AFU needs to know the TID to notify, which in turn means that this information should be available in userspace so it can be communicated to the AFU. Signed-off-by: Alastair D'Silva <alast...@d-

[PATCH v2 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation

2018-04-17 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Switch the use of TIDR on it's CPU feature, rather than assuming it is available based on architecture. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/kernel/process.c | 6 +++--- 1 file changed, 3 insertions(+),

[PATCH v2 1/7] powerpc: Add TIDR CPU feature for Power9

2018-04-17 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> This patch adds a CPU feature bit to show whether the CPU has the TIDR register available, enabling as_notify/wait in userspace. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/cputable.h | 3 ++-

[PATCH v2 4/7] ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action

2018-04-17 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The function removes the process element from NPU cache. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/pnv-ocxl.h | 2 +- arch/powerpc/platforms/powernv/ocxl.c | 4 ++-- drivers/misc

[PATCH v2 0/7] ocxl: Implement Power9 as_notify/wait for OpenCAPI

2018-04-17 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The Power 9 as_notify/wait feature provides a lower latency way to signal a thread that work is complete. This series enables the use of this feature from OpenCAPI adapters, as well as addressing a potential starvation issue when allocating thre

[PATCH v2 3/7] powerpc: use task_pid_nr() for TID allocation

2018-04-17 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The current implementation of TID allocation, using a global IDR, may result in an errant process starving the system of available TIDs. Instead, use task_pid_nr(), as mentioned by the original author. The scenario described which prevented it

Re: [PATCH 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation

2018-04-16 Thread Alastair D'Silva
On Tue, 2018-04-17 at 14:21 +1000, Andrew Donnellan wrote: > On 17/04/18 12:09, Alastair D'Silva wrote: > > From: Alastair D'Silva <alast...@d-silva.org> > > > > Switch the use of TIDR on it's CPU feature, rather than assuming it > > is available based on

[PATCH 4/7] ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The function removes the process element from NPU cache. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/pnv-ocxl.h | 2 +- arch/powerpc/platforms/powernv/ocxl.c | 4 ++-- drivers/misc

[PATCH 5/7] ocxl: Expose the thread_id needed for wait on p9

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order to successfully issue as_notify, an AFU needs to know the TID to notify, which in turn means that this information should be available in userspace so it can be communicated to the AFU. Signed-off-by: Alastair D'Silva <alast...@d-

[PATCH 6/7] ocxl: Add an IOCTL so userspace knows which platform the kernel requires

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> In order for a userspace AFU driver to call the Power9 specific OCXL_IOCTL_ENABLE_P9_WAIT, it needs to verify that it can actually make that call. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- drivers/misc/ocxl

[PATCH 7/7] ocxl: Document new OCXL IOCTLs

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- Documentation/accelerators/ocxl.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/accelerators/oc

[PATCH 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> Switch the use of TIDR on it's CPU feature, rather than assuming it is available based on architecture. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+),

[PATCH 3/7] powerpc: use task_pid_nr() for TID allocation

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The current implementation of TID allocation, using a global IDR, may result in an errant process starving the system of available TIDs. Instead, use task_pid_nr(), as mentioned by the original author. The scenario described which prevented it

[PATCH 1/7] powerpc: Add TIDR CPU feature for Power9

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> This patch adds a CPU feature bit to show whether the CPU has the TIDR register available, enabling as_notify/wait in userspace. Signed-off-by: Alastair D'Silva <alast...@d-silva.org> --- arch/powerpc/include/asm/cputable.h | 3 ++-

[PATCH 0/7] ocxl: Implement Power9 as_notify/wait for OpenCAPI

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva <alast...@d-silva.org> The Power 9 as_notify/wait feature provides a lower latency way to signal a thread that work is complete. This series enables the use of this feature from OpenCAPI adapters, as well as addressing a potential starvation issue when allocating thre