Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: iaa - Remove comp/decomp delay statistics

As part of the simplification/cleanup of the iaa statistics, remove
the comp/decomp delay statistics.

They're actually not really useful and can be/are being more flexibly
generated using standard kernel tracing infrastructure.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Tom Zanussi and committed by
Herbert Xu
956cb8a3 19b0ed5d

-45
-9
drivers/crypto/intel/iaa/iaa_crypto_main.c
··· 1498 1498 u32 compression_crc; 1499 1499 struct idxd_wq *wq; 1500 1500 struct device *dev; 1501 - u64 start_time_ns; 1502 1501 int order = -1; 1503 1502 1504 1503 compression_ctx = crypto_tfm_ctx(tfm); ··· 1571 1572 " req->dlen %d, sg_dma_len(sg) %d\n", dst_addr, nr_sgs, 1572 1573 req->dst, req->dlen, sg_dma_len(req->dst)); 1573 1574 1574 - start_time_ns = iaa_get_ts(); 1575 1575 ret = iaa_compress(tfm, req, wq, src_addr, req->slen, dst_addr, 1576 1576 &req->dlen, &compression_crc, disable_async); 1577 - update_max_comp_delay_ns(start_time_ns); 1578 1577 if (ret == -EINPROGRESS) 1579 1578 return ret; 1580 1579 ··· 1619 1622 struct iaa_wq *iaa_wq; 1620 1623 struct device *dev; 1621 1624 struct idxd_wq *wq; 1622 - u64 start_time_ns; 1623 1625 int order = -1; 1624 1626 1625 1627 cpu = get_cpu(); ··· 1675 1679 dev_dbg(dev, "dma_map_sg, dst_addr %llx, nr_sgs %d, req->dst %p," 1676 1680 " req->dlen %d, sg_dma_len(sg) %d\n", dst_addr, nr_sgs, 1677 1681 req->dst, req->dlen, sg_dma_len(req->dst)); 1678 - start_time_ns = iaa_get_ts(); 1679 1682 ret = iaa_decompress(tfm, req, wq, src_addr, req->slen, 1680 1683 dst_addr, &req->dlen, true); 1681 - update_max_decomp_delay_ns(start_time_ns); 1682 1684 if (ret == -EOVERFLOW) { 1683 1685 dma_unmap_sg(dev, req->dst, sg_nents(req->dst), DMA_FROM_DEVICE); 1684 1686 req->dlen *= 2; ··· 1707 1713 int nr_sgs, cpu, ret = 0; 1708 1714 struct iaa_wq *iaa_wq; 1709 1715 struct device *dev; 1710 - u64 start_time_ns; 1711 1716 struct idxd_wq *wq; 1712 1717 1713 1718 if (!iaa_crypto_enabled) { ··· 1766 1773 " req->dlen %d, sg_dma_len(sg) %d\n", dst_addr, nr_sgs, 1767 1774 req->dst, req->dlen, sg_dma_len(req->dst)); 1768 1775 1769 - start_time_ns = iaa_get_ts(); 1770 1776 ret = iaa_decompress(tfm, req, wq, src_addr, req->slen, 1771 1777 dst_addr, &req->dlen, false); 1772 - update_max_decomp_delay_ns(start_time_ns); 1773 1778 if (ret == -EINPROGRESS) 1774 1779 return ret; 1775 1780
-28
drivers/crypto/intel/iaa/iaa_crypto_stats.c
··· 20 20 static u64 total_comp_calls; 21 21 static u64 total_decomp_calls; 22 22 static u64 total_sw_decomp_calls; 23 - static u64 max_comp_delay_ns; 24 - static u64 max_decomp_delay_ns; 25 23 static u64 total_comp_bytes_out; 26 24 static u64 total_decomp_bytes_in; 27 25 static u64 total_completion_einval_errors; ··· 68 70 total_completion_comp_buf_overflow_errors++; 69 71 } 70 72 71 - void update_max_comp_delay_ns(u64 start_time_ns) 72 - { 73 - u64 time_diff; 74 - 75 - time_diff = ktime_get_ns() - start_time_ns; 76 - 77 - if (time_diff > max_comp_delay_ns) 78 - max_comp_delay_ns = time_diff; 79 - } 80 - 81 - void update_max_decomp_delay_ns(u64 start_time_ns) 82 - { 83 - u64 time_diff; 84 - 85 - time_diff = ktime_get_ns() - start_time_ns; 86 - 87 - if (time_diff > max_decomp_delay_ns) 88 - max_decomp_delay_ns = time_diff; 89 - } 90 - 91 73 void update_wq_comp_calls(struct idxd_wq *idxd_wq) 92 74 { 93 75 struct iaa_wq *wq = idxd_wq_get_private(idxd_wq); ··· 105 127 total_comp_calls = 0; 106 128 total_decomp_calls = 0; 107 129 total_sw_decomp_calls = 0; 108 - max_comp_delay_ns = 0; 109 - max_decomp_delay_ns = 0; 110 130 total_comp_bytes_out = 0; 111 131 total_decomp_bytes_in = 0; 112 132 total_completion_einval_errors = 0; ··· 228 252 229 253 iaa_crypto_debugfs_root = debugfs_create_dir("iaa_crypto", NULL); 230 254 231 - debugfs_create_u64("max_comp_delay_ns", 0644, 232 - iaa_crypto_debugfs_root, &max_comp_delay_ns); 233 - debugfs_create_u64("max_decomp_delay_ns", 0644, 234 - iaa_crypto_debugfs_root, &max_decomp_delay_ns); 235 255 debugfs_create_u64("total_comp_calls", 0644, 236 256 iaa_crypto_debugfs_root, &total_comp_calls); 237 257 debugfs_create_u64("total_decomp_calls", 0644,
-8
drivers/crypto/intel/iaa/iaa_crypto_stats.h
··· 13 13 void update_total_decomp_calls(void); 14 14 void update_total_sw_decomp_calls(void); 15 15 void update_total_decomp_bytes_in(int n); 16 - void update_max_comp_delay_ns(u64 start_time_ns); 17 - void update_max_decomp_delay_ns(u64 start_time_ns); 18 16 void update_completion_einval_errs(void); 19 17 void update_completion_timeout_errs(void); 20 18 void update_completion_comp_buf_overflow_errs(void); ··· 21 23 void update_wq_comp_bytes(struct idxd_wq *idxd_wq, int n); 22 24 void update_wq_decomp_calls(struct idxd_wq *idxd_wq); 23 25 void update_wq_decomp_bytes(struct idxd_wq *idxd_wq, int n); 24 - 25 - static inline u64 iaa_get_ts(void) { return ktime_get_ns(); } 26 26 27 27 #else 28 28 static inline int iaa_crypto_debugfs_init(void) { return 0; } ··· 31 35 static inline void update_total_decomp_calls(void) {} 32 36 static inline void update_total_sw_decomp_calls(void) {} 33 37 static inline void update_total_decomp_bytes_in(int n) {} 34 - static inline void update_max_comp_delay_ns(u64 start_time_ns) {} 35 - static inline void update_max_decomp_delay_ns(u64 start_time_ns) {} 36 38 static inline void update_completion_einval_errs(void) {} 37 39 static inline void update_completion_timeout_errs(void) {} 38 40 static inline void update_completion_comp_buf_overflow_errs(void) {} ··· 39 45 static inline void update_wq_comp_bytes(struct idxd_wq *idxd_wq, int n) {} 40 46 static inline void update_wq_decomp_calls(struct idxd_wq *idxd_wq) {} 41 47 static inline void update_wq_decomp_bytes(struct idxd_wq *idxd_wq, int n) {} 42 - 43 - static inline u64 iaa_get_ts(void) { return 0; } 44 48 45 49 #endif // CONFIG_CRYPTO_DEV_IAA_CRYPTO_STATS 46 50