Lines Matching +full:async +full:- +full:page +full:- +full:mode
1 .. SPDX-License-Identifier: GPL-2.0
18 higher-level compression devices such as zswap.
24 For example, a zswap device can select the IAA 'fixed' mode
25 represented by selecting the 'deflate-iaa' crypto compression
28 # echo deflate-iaa > /sys/module/zswap/parameters/compressor
30 This will tell zswap to use the IAA 'fixed' compression mode for all
34 mode.
36 The 'fixed' compression mode implements the compression scheme
38 'deflate-iaa'. (Because the IAA hardware has a 4k history-window
42 the IAA fixed mode deflate algorithm is given its own algorithm name
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
83 Scalable mode
84 -------------
86 Scalable mode supports Shared Virtual Memory (SVM or SVA). It is
91 with VT-d turned on in BIOS.
93 With scalable mode, both shared and dedicated workqueues are available
96 For scalable mode, the following BIOS settings should be enabled::
98 …Socket Configuration > IIO Configuration > Intel VT for Directed I/O (VT-d) > Intel VT for Directe…
103 Legacy mode
104 -----------
106 Legacy mode is entered when using the kernel boot commandline::
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.
116 With legacy mode, only dedicated workqueues are available for use.
119 No IOMMU mode
120 -------------
122 No IOMMU mode is entered when using the kernel boot commandline::
126 With no IOMMU mode, only dedicated workqueues are available for use.
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
234 - verify_compress
242 The default setting is '1' - verify all compresses.
244 - sync_mode
246 Select mode to be used to wait for completion of each compresses
249 The crypto async interface support implemented by iaa_crypto
251 so in a synchronous manner - it fills and submits the IDXD
258 support for callers that can make use of it. In this mode, it
260 with -EINPROGRESS. The caller can then either poll for completion
263 for an interrupt signaling completion. This latter mode is
265 synchronous wrappers. Although it is supported this mode is
266 significantly slower than the synchronous mode that does the
269 This mode can be enabled by writing 'async_irq' to the sync_mode
274 Async mode without interrupts (caller must poll) can be enabled by
275 writing 'async' to it (please see Caveat)::
277 echo async > /sys/bus/dsa/drivers/crypto/sync_mode
279 The mode that does the polling in the iaa_crypto driver can be
284 The default mode is 'sync'.
287 for async polling without interrupts is via the 'sync' mode as
288 described earlier, writing 'async' to
290 'sync' mode. This is to ensure correct iaa_crypto behavior until true
291 async polling without interrupts is enabled in iaa_crypto.
296 -------------------------
301 mode "dedicated"
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 -----------------
437 dedicated mode options described above, and zswap should be enabled as
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
622 the 'fixed' compression mode::
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);
749 /* initialize data in page to all '*' chars */
765 /* Access the page ... this will swap it back in again */
772 printf(" page %d data: %#llx\n", i, *dump_ptr);
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.
803 odd-numbered devices; the even-numbered devices are DSA devices and
833 # echo dedicated > /sys/bus/dsa/devices/iax3/wq3.3/mode