Lines Matching +full:dsa +full:- +full:specific

1 .. SPDX-License-Identifier: GPL-2.0
18 higher-level compression devices such as zswap.
25 represented by selecting the 'deflate-iaa' crypto compression
28 # echo deflate-iaa > /sys/module/zswap/parameters/compressor
38 'deflate-iaa'. (Because the IAA hardware has a 4k history-window
52 Cryptographic API -> Hardware crypto devices -> Support for Intel(R) IAA Compression Accelerator
59 …Cryptographic API -> Hardware crypto devices -> Support for Intel(R) IAA Compression -> Enable Int…
78 - Scalable
79 - Legacy
80 - No IOMMU
84 -------------
91 with VT-d turned on in BIOS.
98 …Socket Configuration > IIO Configuration > Intel VT for Directed I/O (VT-d) > Intel VT for Directe…
104 -----------
110 or VT-d is not turned on in BIOS.
112 If you have booted into Linux and not sure if VT-d is on, do a "dmesg
113 | grep -i dmar". If you don't see a number of DMAR devices enumerated,
114 most likely VT-d is not on.
120 -------------
132 accel-config
133 ------------
139 configuration, and then re-register the deflate-iaa algorithm with the
153 The userspace tool to help doing that is called accel-config. Using
154 accel-config to configure device or loading a previously saved config
158 cover the sysfs interface but assumes you will be using accel-config.
163 The accel-config tool along with instructions for building it can be
166 https://github.com/intel/idxd-config/#readme
169 -------------
177 specified as 'iax' rather than 'iaa' - this is because upstream still
182 …accel-config config-wq --group-id=0 --mode=dedicated --type=kernel --priority=10 --name="iaa_crypt…
184 accel-config config-engine iax1/engine1.0 --group-id=0
188 accel-config enable-device iax1
192 accel-config enable-wq iax1/wq1.0
220 -----------------
222 There are a couple user-configurable driver attributes that can be
226 /sys/bus/dsa/drivers/crypto/
234 - verify_compress
240 echo 0 > /sys/bus/dsa/drivers/crypto/verify_compress
242 The default setting is '1' - verify all compresses.
244 - sync_mode
251 so in a synchronous manner - it fills and submits the IDXD
260 with -EINPROGRESS. The caller can then either poll for completion
261 itself, which requires specific code in the caller which currently
272 echo async_irq > /sys/bus/dsa/drivers/crypto/sync_mode
277 echo async > /sys/bus/dsa/drivers/crypto/sync_mode
282 echo sync > /sys/bus/dsa/drivers/crypto/sync_mode
289 '/sys/bus/dsa/drivers/crypto/sync_mode' will internally enable the
296 -------------------------
320 to have the new configuration applied to the deflate-iaa crypto
321 algorithm, it needs to be re-registered by removing and reinserting
331 # ls -al /sys/kernel/debug/iaa-crypto/
333 drwxr-xr-x 2 root root 0 Mar 3 07:55 .
334 drwx------ 53 root root 0 Mar 3 07:55 ..
335 -rw-r--r-- 1 root root 0 Mar 3 07:55 global_stats
336 -rw-r--r-- 1 root root 0 Mar 3 07:55 stats_reset
337 -rw-r--r-- 1 root root 0 Mar 3 07:55 wq_stats
353 The wq_stats file shows per-wq stats, a set for each iaa device and wq
415 per-device and per-wq stats::
434 -----------------
463 # cat /sys/bus/dsa/devices/iax1/state
465 # cat /sys/bus/dsa/devices/iax1/wq1.0/state
471 # echo -n 'module iaa_crypto +p' > /sys/kernel/debug/dynamic_debug/control
472 # echo -n 'module idxd +p' > /sys/kernel/debug/dynamic_debug/control
478 # echo deflate-iaa > /sys/module/zswap/parameters/compressor
497 …comp_acompress: dma_map_sg, src_addr 223925c000, nr_sgs 1, req->src 00000000ee7cb5e6, req->slen 40…
498 …comp_acompress: dma_map_sg, dst_addr 21dadf8000, nr_sgs 1, req->dst 000000008d6acea8, req->dlen 40…
499 …press: desc->src1_addr 223925c000, desc->src1_size 4096, desc->dst_addr 21dadf8000, desc->max_dst_…
500 …y: (verify) desc->src1_addr 21dadf8000, desc->src1_size 228, desc->dst_addr 223925c000, desc->max_…
508 # swapoff -a
519 # swapon -a
521 Following all that the IAA device(s) can now be re-configured and
533 lspci -d:0cfe
535 lspci -d:0cfe | wc -l
541 num_iaa=$(lspci -d:${iaa_dev_id} | wc -l)
551 accel-config disable-wq iax${i}/wq${i}.0
553 accel-config disable-device iax${i}
570 …accel-config config-wq --group-id=0 --mode=dedicated --wq-size=128 --priority=10 --type=kernel --n…
571 accel-config config-engine iax${i}/engine${i}.0 --group-id=0
583 accel-config enable-device iax${i}
585 accel-config enable-wq iax${i}/wq${i}.0
592 enabled debug output (echo -n 'module iaa_crypto +p' >
621 Now run the following zswap-specific setup commands to have zswap use
626 echo deflate-iaa > /sys/module/zswap/parameters/compressor
645 you've enabled debug output (echo -n 'module iaa_crypto +p' >
648 …comp_acompress: dma_map_sg, src_addr 223925c000, nr_sgs 1, req->src 00000000ee7cb5e6, req->slen 40…
649 …comp_acompress: dma_map_sg, dst_addr 21dadf8000, nr_sgs 1, req->dst 000000008d6acea8, req->dlen 40…
650 …press: desc->src1_addr 223925c000, desc->src1_size 4096, desc->dst_addr 21dadf8000, desc->max_dst_…
651 …y: (verify) desc->src1_addr 21dadf8000, desc->src1_size 228, desc->dst_addr 223925c000, desc->max_…
652 …mp_adecompress: dma_map_sg, src_addr 21ddd8b100, nr_sgs 1, req->src 0000000084adab64, req->slen 22…
653 …mp_adecompress: dma_map_sg, dst_addr 21ee3dc000, nr_sgs 1, req->dst 000000004e2990d0, req->dlen 40…
654 …decompress: desc->src1_addr 21ddd8b100, desc->src1_size 228, desc->dst_addr 21ee3dc000, desc->max_…
655 …mp_adecompress: dma_map_sg, src_addr 21ddd8b100, nr_sgs 1, req->src 0000000084adab64, req->slen 22…
656 …mp_adecompress: dma_map_sg, dst_addr 21f1551000, nr_sgs 1, req->dst 000000004e2990d0, req->dlen 40…
657 …decompress: desc->src1_addr 21ddd8b100, desc->src1_size 228, desc->dst_addr 21f1551000, desc->max_…
668 swapoff -a
680 ------------------
687 lspci -d:0cfe
689 lspci -d:0cfe | wc -l
695 num_iaa=$(lspci -d:${iaa_dev_id} | wc -l)
705 accel-config disable-wq iax${i}/wq${i}.0
707 accel-config disable-device iax${i}
718 memory_madvise.c (gcc -o memory_memadvise memory_madvise.c)::
746 … addr = mmap(NULL, nr_pages * PG_SZ, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
780 loop --;
791 --------------------------
796 since accel-config can do everything the sysfs interface can and in
797 fact accel-config is based on it under the covers.
799 The 'IAA config path' is /sys/bus/dsa/devices and contains
803 odd-numbered devices; the even-numbered devices are DSA devices and
806 The 'IAA device bind path' is /sys/bus/dsa/drivers/idxd/bind and is
809 The 'IAA workqueue bind path' is /sys/bus/dsa/drivers/crypto/bind and
812 Similarly /sys/bus/dsa/drivers/idxd/unbind and
813 /sys/bus/dsa/drivers/crypto/unbind are used to disable IAA devices and
823 # echo wq3.0 > /sys/bus/dsa/drivers/crypto/unbind
824 # echo wq3.1 > /sys/bus/dsa/drivers/crypto/unbind
828 # echo iax3 > /sys/bus/dsa/drivers/idxd/unbind
833 # echo dedicated > /sys/bus/dsa/devices/iax3/wq3.3/mode
834 # echo 128 > /sys/bus/dsa/devices/iax3/wq3.3/size
835 # echo 0 > /sys/bus/dsa/devices/iax3/wq3.3/group_id
836 # echo 10 > /sys/bus/dsa/devices/iax3/wq3.3/priority
837 # echo "kernel" > /sys/bus/dsa/devices/iax3/wq3.3/type
838 # echo "iaa_crypto" > /sys/bus/dsa/devices/iax3/wq3.3/name
839 # echo "crypto" > /sys/bus/dsa/devices/iax3/wq3.3/driver_name
843 # echo iax3 > /sys/bus/dsa/drivers/idxd/bind
848 # echo wq3.0 > /sys/bus/dsa/drivers/crypto/bind
849 # echo wq3.1 > /sys/bus/dsa/drivers/crypto/bind