From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Haren Myneni <haren@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-crypto@vger.kernel.org,
mpe@ellerman.id.au, herbert@gondor.apana.org.au,
npiggin@gmail.com
Subject: Re: [PATCH 00/16] Enable VAS and NX-GZIP support on powerVM
Date: Sun, 11 Apr 2021 10:07:04 +0200 [thread overview]
Message-ID: <bfeef945-5843-074b-a861-af881ae06964@csgroup.eu> (raw)
In-Reply-To: <b4631127bd025d9585246606c350ec88dbe1e99a.camel@linux.ibm.com>
Le 11/04/2021 à 02:27, Haren Myneni a écrit :
>
> This patch series enables VAS / NX-GZIP on powerVM which allows
> the user space to do copy/paste with the same existing interface
> that is available on powerNV.
Can you explain (here and in patch 1 at least) what VAS and NX means ?
Is that Vector Addition System ? Is that Virtual Address Space ?
(https://en.wikipedia.org/wiki/VAS)
>
> VAS Enablement:
> - Get all VAS capabilities using H_QUERY_VAS_CAPABILITIES that are
> available in the hypervisor. These capabilities tells OS which
> type of features (credit types such as Default and Quality of
> Service (QoS)). Also gives specific capabilities for each credit
> type: Maximum window credits, Maximum LPAR credits, Target credits
> in that parition (varies from max LPAR credits based DLPAR
> operation), whether supports user mode COPY/PASTE and etc.
> - Register LPAR VAS operations such as open window. get paste
> address and close window with the current VAS user space API.
> - Open window operation - Use H_ALLOCATE_VAS_WINDOW HCALL to open
> window and H_MODIFY_VAS_WINDOW HCALL to setup the window with LPAR
> PID and etc.
> - mmap to paste address returned in H_ALLOCATE_VAS_WINDOW HCALL
> - To close window, H_DEALLOCATE_VAS_WINDOW HCALL is used to close in
> the hypervisor.
>
> NX Enablement:
> - Get NX capabilities from the the hypervisor which provides Maximum
> buffer length in a single GZIP request, recommended minimum
> compression / decompression lengths.
> - Register to VAS to enable user space VAS API
>
> Main feature differences with powerNV implementation:
> - Each VAS window will be configured with a number of credits which
> means that many requests can be issues simultaniously on that
> window. On powerNV, 1K credits are configured per window.
> Whereas on powerVM, the hypervisor allows 1 credit per window
> at present.
> - The hypervisor introduced 2 different types of credits: Default -
> Uses normal priority FIFO and Quality of Service (QoS) - Uses high
> priority FIFO. On powerVM, VAS/NX HW resources are shared across
> LPARs. The total number of credits available on a system depends
> on cores configured. We may see more credits are assigned across
> the system than the NX HW resources can handle. So to avoid NX HW
> contention, pHyp introduced QoS credits which can be configured
> by system administration with HMC API. Then the total number of
> available default credits on LPAR varies based on QoS credits
> configured.
> - On powerNV, windows are allocated on a specific VAS instance
> and the user space can select VAS instance with the open window
> ioctl. Since VAS instances can be shared across partitions on
> powerVM, the hypervisor manages window allocations on different
> VAS instances. So H_ALLOCATE_VAS_WINDOW allows to select by domain
> indentifiers (H_HOME_NODE_ASSOCIATIVITY values by cpu). By default
> the hypervisor selects VAS instance closer to CPU resources that the
> parition uses. So vas_id in ioctl interface is ignored on powerVM
> except vas_id=-1 which is used to allocate window based on CPU that
> the process is executing. This option is needed for process affinity
> to NUMA node.
>
> The existing applications that linked with libnxz should work as
> long as the job request length is restricted to
> req_max_processed_len.
>
> Tested the following patches on P10 successfully with test cases
> given: https://github.com/libnxz/power-gzip
>
> Note: The hypervisor supports user mode NX from p10 onwards. Linux
> supports user mode VAS/NX on P10 only with radix page tables.
>
> Patches 1- 4: Make the code that is needed for both powerNV and
> powerVM to powerpc platform independent.
> Patch5: Modify vas-window struct to support both and the
> related changes.
> Patch 6: Define HCALL and the related VAS/NXGZIP specific
> structs.
> Patch 7: Define QoS credit flag in window open ioctl
> Patch 8: Implement Allocate, Modify and Deallocate HCALLs
> Patch 9: Retrieve VAS capabilities from the hypervisor
> Patch 10; Implement window operations and integrate with API
> Patch 11: Setup IRQ and NX fault handling
> Patch 12; Add sysfs interface to expose VAS capabilities
> Patch 13 - 14: Make the code common to add NX-GZIP enablement
> Patch 15: Get NX capabilities from the hypervisor
> patch 16; Add sysfs interface to expose NX capabilities
>
> Haren Myneni (16):
> powerpc/powernv/vas: Rename register/unregister functions
> powerpc/vas: Make VAS API powerpc platform independent
> powerpc/vas: Create take/drop task reference functions
> powerpc/vas: Move update_csb/dump_crb to platform independent
> powerpc/vas: Define and use common vas_window struct
> powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs
> powerpc/vas: Define QoS credit flag to allocate window
> powerpc/pseries/vas: Implement allocate/modify/deallocate HCALLS
> powerpc/pseries/vas: Implement to get all capabilities
> powerpc/pseries/vas: Integrate API with open/close windows
> powerpc/pseries/vas: Setup IRQ and fault handling
> powerpc/pseries/vas: sysfs interface to export capabilities
> crypto/nx: Rename nx-842-pseries file name to nx-common-pseries
> crypto/nx: Register and unregister VAS interface
> crypto/nx: Get NX capabilities for GZIP coprocessor type
> crypto/nx: sysfs interface to export NX capabilities
>
> arch/powerpc/Kconfig | 15 +
> arch/powerpc/include/asm/hvcall.h | 7 +
> arch/powerpc/include/asm/vas.h | 122 +++-
> arch/powerpc/include/uapi/asm/vas-api.h | 6 +-
> arch/powerpc/kernel/Makefile | 1 +
> arch/powerpc/kernel/vas-api.c | 485 +++++++++++++
> arch/powerpc/platforms/powernv/Kconfig | 14 -
> arch/powerpc/platforms/powernv/Makefile | 2 +-
> arch/powerpc/platforms/powernv/vas-api.c | 278 --------
> arch/powerpc/platforms/powernv/vas-debug.c | 12 +-
> arch/powerpc/platforms/powernv/vas-fault.c | 155 +---
> arch/powerpc/platforms/powernv/vas-trace.h | 6 +-
> arch/powerpc/platforms/powernv/vas-window.c | 250 ++++---
> arch/powerpc/platforms/powernv/vas.h | 42 +-
> arch/powerpc/platforms/pseries/Makefile | 1 +
> arch/powerpc/platforms/pseries/vas-sysfs.c | 173 +++++
> arch/powerpc/platforms/pseries/vas.c | 674 ++++++++++++++++++
> arch/powerpc/platforms/pseries/vas.h | 98 +++
> drivers/crypto/nx/Makefile | 2 +-
> drivers/crypto/nx/nx-common-powernv.c | 6 +-
> .../{nx-842-pseries.c => nx-common-pseries.c} | 135 ++++
> 21 files changed, 1885 insertions(+), 599 deletions(-)
> create mode 100644 arch/powerpc/kernel/vas-api.c
> delete mode 100644 arch/powerpc/platforms/powernv/vas-api.c
> create mode 100644 arch/powerpc/platforms/pseries/vas-sysfs.c
> create mode 100644 arch/powerpc/platforms/pseries/vas.c
> create mode 100644 arch/powerpc/platforms/pseries/vas.h
> rename drivers/crypto/nx/{nx-842-pseries.c => nx-common-pseries.c} (90%)
>
prev parent reply other threads:[~2021-04-11 8:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-11 0:27 [PATCH 00/16] Enable VAS and NX-GZIP support on powerVM Haren Myneni
2021-04-11 0:29 ` [PATCH 01/16] powerpc/powernv/vas: Rename register/unregister functions Haren Myneni
2021-04-11 0:31 ` [PATCH 02/16] powerpc/vas: Make VAS API powerpc platform independent Haren Myneni
2021-04-11 8:49 ` Christophe Leroy
2021-04-12 0:29 ` Haren Myneni
2021-04-13 12:59 ` Michael Ellerman
2021-04-11 0:32 ` [PATCH 03/16] powerpc/vas: Create take/drop task reference functions Haren Myneni
2021-04-11 0:33 ` [PATCH 04/16] powerpc/vas: Move update_csb/dump_crb to platform independent Haren Myneni
2021-04-11 0:34 ` [PATCH 05/16] powerpc/vas: Define and use common vas_window struct Haren Myneni
2021-04-11 0:35 ` [PATCH 06/16] powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs Haren Myneni
2021-04-11 0:35 ` [PATCH 07/16] powerpc/vas: Define QoS credit flag to allocate window Haren Myneni
2021-04-11 0:36 ` [PATCH 08/16] powerpc/pseries/VAS: Implement allocate/modify/deallocate HCALLS Haren Myneni
2021-04-11 0:38 ` [PATCH 09/16] powerpc/pseries/vas: Implement to get all capabilities Haren Myneni
2021-04-11 0:39 ` [PATCH 10/16] powerpc/pseries/vas: Integrate API with open/close windows Haren Myneni
2021-04-11 0:40 ` [PATCH 11/16] powerpc/pseries/vas: Setup IRQ and fault handling Haren Myneni
2021-04-11 0:41 ` [PATCH 12/16] powerpc/pseries/vas: sysfs interface to export capabilities Haren Myneni
2021-04-11 0:41 ` [PATCH 13/16] crypto/nx: Rename nx-842-pseries file name to nx-common-pseries Haren Myneni
2021-04-11 0:43 ` [PATCH 14/16] crypto/nx: Register and unregister VAS interface Haren Myneni
2021-04-11 7:48 ` kernel test robot
2021-04-11 0:44 ` [PATCH 15/16] crypto/nx: Get NX capabilities for GZIP coprocessor type Haren Myneni
2021-04-11 7:48 ` kernel test robot
2021-04-11 0:45 ` [PATCH 16/16] crypto/nx: sysfs interface to export NX capabilities Haren Myneni
2021-04-11 8:07 ` Christophe Leroy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bfeef945-5843-074b-a861-af881ae06964@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=haren@linux.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).