migration/multifd: implement qpl compression and decompression
authorYuan Liu <yuan1.liu@intel.com>
Mon, 10 Jun 2024 10:21:09 +0000 (18:21 +0800)
committerFabiano Rosas <farosas@suse.de>
Fri, 14 Jun 2024 17:01:29 +0000 (14:01 -0300)
commitf6fe9fea995249ecc2cd72975d803fbf4d512c02
tree2df9f78d56a24c7a1e32dd0778b09cff83fcef9b
parent34e104b897da6e144a5f34e7c5eebf8a4c4d9d59
migration/multifd: implement qpl compression and decompression

QPL compression and decompression will use IAA hardware path if the IAA
hardware is available. Otherwise the QPL library software path is used.

The hardware path will automatically fall back to QPL software path if
the IAA queues are busy. In some scenarios, this may happen frequently,
such as configuring 4 channels but only one IAA device is available. In
the case of insufficient IAA hardware resources, retry and fallback can
help optimize performance:

 1. Retry + SW fallback:
    total time: 14649 ms
    downtime: 25 ms
    throughput: 17666.57 mbps
    pages-per-second: 1509647

 2. No fallback, always wait for work queues to become available
    total time: 18381 ms
    downtime: 25 ms
    throughput: 13698.65 mbps
    pages-per-second: 859607

If both the hardware and software paths fail, the uncompressed page is
sent directly.

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Nanhai Zou <nanhai.zou@intel.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
migration/multifd-qpl.c