Lines Matching +full:can +full:- +full:disable

1 .. SPDX-License-Identifier: GPL-2.0
13 The IAA hardware spec can be found here:
18 higher-level compression devices such as zswap.
20 Users can select IAA compress/decompress acceleration by specifying
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
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…
74 IAA is one of the first Intel accelerator IPs that can work in
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 ------------
138 the user must first disable the IAA devices and workqueues, reset the
139 configuration, and then re-register the deflate-iaa algorithm with the
143 section below can be used to disable the default configuration.
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
155 is highly recommended. The device can be controlled via sysfs
158 cover the sysfs interface but assumes you will be using accel-config.
160 The :ref:`iaa_sysfs_config` section in the appendix below can be
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
216 algorithms can be unregistered by removing the module.
220 -----------------
222 There are a couple user-configurable driver attributes that can be
234 - verify_compress
238 codes if unsuccessful. This can be toggled with 0/1::
242 The default setting is '1' - verify all compresses.
244 - sync_mode
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
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
279 The mode that does the polling in the iaa_crypto driver can be
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
323 Cases' section below can be used to disable the default configuration.
329 driver will generate statistics which can be accessed in debugfs at::
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 -----------------
469 commands can be used to enable debug output::
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
485 Now you can now run the zswap workload you want to measure. For
498 …comp_acompress: dma_map_sg, src_addr 223925c000, nr_sgs 1, req->src 00000000ee7cb5e6, req->slen 40…
499 …comp_acompress: dma_map_sg, dst_addr 21dadf8000, nr_sgs 1, req->dst 000000008d6acea8, req->dlen 40…
500 …press: desc->src1_addr 223925c000, desc->src1_size 4096, desc->dst_addr 21dadf8000, desc->max_dst_…
501 …y: (verify) desc->src1_addr 21dadf8000, desc->src1_size 228, desc->dst_addr 223925c000, desc->max_…
504 Now that basic functionality has been demonstrated, the defaults can
506 first disable zswap::
509 # swapoff -a
516 below to disable the default configuration.
520 # swapon -a
522 Following all that the IAA device(s) can now be re-configured and
534 lspci -d:0cfe
536 lspci -d:0cfe | wc -l
542 num_iaa=$(lspci -d:${iaa_dev_id} | wc -l)
546 # disable iaa wqs and devices
548 echo "Disable IAA"
551 echo disable wq iax${i}/wq${i}.0
552 accel-config disable-wq iax${i}/wq${i}.0
553 echo disable iaa iax${i}
554 accel-config disable-device iax${i}
557 echo "End Disable IAA"
571 …accel-config config-wq --group-id=0 --mode=dedicated --wq-size=128 --priority=10 --type=kernel --n…
572 accel-config config-engine iax${i}/engine${i}.0 --group-id=0
584 accel-config enable-device iax${i}
586 accel-config enable-wq iax${i}/wq${i}.0
593 enabled debug output (echo -n 'module iaa_crypto +p' >
622 Now run the following zswap-specific setup commands to have zswap use
627 echo deflate-iaa > /sys/module/zswap/parameters/compressor
635 Finally, you can now run the zswap workload you want to measure. For
647 you've enabled debug output (echo -n 'module iaa_crypto +p' >
650 …comp_acompress: dma_map_sg, src_addr 223925c000, nr_sgs 1, req->src 00000000ee7cb5e6, req->slen 40…
651 …comp_acompress: dma_map_sg, dst_addr 21dadf8000, nr_sgs 1, req->dst 000000008d6acea8, req->dlen 40…
652 …press: desc->src1_addr 223925c000, desc->src1_size 4096, desc->dst_addr 21dadf8000, desc->max_dst_…
653 …y: (verify) desc->src1_addr 21dadf8000, desc->src1_size 228, desc->dst_addr 223925c000, desc->max_…
654 …mp_adecompress: dma_map_sg, src_addr 21ddd8b100, nr_sgs 1, req->src 0000000084adab64, req->slen 22…
655 …mp_adecompress: dma_map_sg, dst_addr 21ee3dc000, nr_sgs 1, req->dst 000000004e2990d0, req->dlen 40…
656 …decompress: desc->src1_addr 21ddd8b100, desc->src1_size 228, desc->dst_addr 21ee3dc000, desc->max_…
657 …mp_adecompress: dma_map_sg, src_addr 21ddd8b100, nr_sgs 1, req->src 0000000084adab64, req->slen 22…
658 …mp_adecompress: dma_map_sg, dst_addr 21f1551000, nr_sgs 1, req->dst 000000004e2990d0, req->dlen 40…
659 …decompress: desc->src1_addr 21ddd8b100, desc->src1_size 228, desc->dst_addr 21f1551000, desc->max_…
670 swapoff -a
677 devices can be disabled.
681 IAA disable script
682 ------------------
689 lspci -d:0cfe
691 lspci -d:0cfe | wc -l
697 num_iaa=$(lspci -d:${iaa_dev_id} | wc -l)
701 # disable iaa wqs and devices
703 echo "Disable IAA"
706 echo disable wq iax${i}/wq${i}.0
707 accel-config disable-wq iax${i}/wq${i}.0
708 echo disable iaa iax${i}
709 accel-config disable-device iax${i}
712 echo "End Disable IAA"
714 Finally, at this point the iaa_crypto module can be removed, which
720 memory_madvise.c (gcc -o memory_memadvise memory_madvise.c)::
748 … addr = mmap(NULL, nr_pages * PG_SZ, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
782 loop --;
793 --------------------------
798 since accel-config can do everything the sysfs interface can and in
799 fact accel-config is based on it under the covers.
805 odd-numbered devices; the even-numbered devices are DSA devices and
806 can be ignored for IAA).
815 /sys/bus/dsa/drivers/crypto/unbind are used to disable IAA devices and
822 1) Disable any workqueues enabled on the device. For example to
823 disable workques 0 and 1 on IAA device 3::
828 2) Disable the device. For example to disable IAA device 3::