From patchwork Tue Mar 19 16:45:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liu, Yuan1" X-Patchwork-Id: 13597473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C41EC54E58 for ; Wed, 20 Mar 2024 08:34:11 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmrNz-0004XG-Gp; Wed, 20 Mar 2024 04:33:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmrNs-0004W6-J5 for qemu-devel@nongnu.org; Wed, 20 Mar 2024 04:33:18 -0400 Received: from mgamail.intel.com ([198.175.65.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmrNq-0005U3-4n for qemu-devel@nongnu.org; Wed, 20 Mar 2024 04:33:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710923595; x=1742459595; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CIWnqF9EoTF2zMvqZ/+tNdqB3NlIMG2yD3I2MMICmII=; b=PxxUPcM30cdkSDuWfzDPRl6CKRXYB7TxMBjSba1yfS+9Wa6MQ3dVDDgv vBedKcd6Hgtu/7+kMqHoE8OjA529N7BwmWFyR60q9IvjyGtnh6PBxGm2O a/WRvHpyogAOMq8zPcPvyTWI3VwjjexzFw/uxxbVkFSlkWvH3XBE1vgd/ /VN2ClIRjvTzUCm0ot6CnpTfsVvjlbifv3VCxV/fxfgKQ4ZcXViuSayED g1frDTzyqYcoaJBWsbkW24AOAQgi0BOuK6yl1cAJn3ty0gujxRUIHK3im Y6iHB0xi+AlvdBSj79eX/HqqEfb4vuh/1BD/AG09jTqfOo6FzrTXhMhfQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5952927" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5952927" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 01:33:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="13986718" Received: from sae-gw02.sh.intel.com (HELO localhost) ([10.239.45.110]) by orviesa010.jf.intel.com with ESMTP; 20 Mar 2024 01:33:07 -0700 From: Yuan Liu To: peterx@redhat.com, farosas@suse.de Cc: qemu-devel@nongnu.org, hao.xiang@bytedance.com, bryan.zhang@bytedance.com, yuan1.liu@intel.com, nanhai.zou@intel.com Subject: [PATCH v5 3/7] configure: add --enable-qpl build option Date: Wed, 20 Mar 2024 00:45:23 +0800 Message-Id: <20240319164527.1873891-4-yuan1.liu@intel.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240319164527.1873891-1-yuan1.liu@intel.com> References: <20240319164527.1873891-1-yuan1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.18; envelope-from=yuan1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, DKIMWL_WL_HIGH=-0.422, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org add --enable-qpl and --disable-qpl options to enable and disable the QPL compression method for multifd migration. the Query Processing Library (QPL) is an open-source library that supports data compression and decompression features. The QPL compression is based on the deflate compression algorithm and use Intel In-Memory Analytics Accelerator(IAA) hardware for compression and decompression acceleration. Please refer to the following for more information about QPL https://intel.github.io/qpl/documentation/introduction_docs/introduction.html Signed-off-by: Yuan Liu Reviewed-by: Nanhai Zou --- meson.build | 16 ++++++++++++++++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 21 insertions(+) diff --git a/meson.build b/meson.build index b375248a76..bee7dcd53b 100644 --- a/meson.build +++ b/meson.build @@ -1200,6 +1200,20 @@ if not get_option('zstd').auto() or have_block required: get_option('zstd'), method: 'pkg-config') endif +qpl = not_found +if not get_option('qpl').auto() + libqpl = cc.find_library('qpl', required: false) + if not libqpl.found() + error('libqpl not found, please install it from ' + + 'https://intel.github.io/qpl/documentation/get_started_docs/installation.html') + endif + libaccel = dependency('libaccel-config', version: '>=4.0.0', + required: true, + method: 'pkg-config') + qpl = declare_dependency(dependencies: [libqpl, libaccel, + cc.find_library('dl', required: get_option('qpl'))], + link_args: ['-lstdc++']) +endif virgl = not_found have_vhost_user_gpu = have_tools and host_os == 'linux' and pixman.found() @@ -2305,6 +2319,7 @@ config_host_data.set('CONFIG_MALLOC_TRIM', has_malloc_trim) config_host_data.set('CONFIG_STATX', has_statx) config_host_data.set('CONFIG_STATX_MNT_ID', has_statx_mnt_id) config_host_data.set('CONFIG_ZSTD', zstd.found()) +config_host_data.set('CONFIG_QPL', qpl.found()) config_host_data.set('CONFIG_FUSE', fuse.found()) config_host_data.set('CONFIG_FUSE_LSEEK', fuse_lseek.found()) config_host_data.set('CONFIG_SPICE_PROTOCOL', spice_protocol.found()) @@ -4462,6 +4477,7 @@ summary_info += {'snappy support': snappy} summary_info += {'bzip2 support': libbzip2} summary_info += {'lzfse support': liblzfse} summary_info += {'zstd support': zstd} +summary_info += {'Query Processing Library support': qpl} summary_info += {'NUMA host support': numa} summary_info += {'capstone': capstone} summary_info += {'libpmem support': libpmem} diff --git a/meson_options.txt b/meson_options.txt index 0a99a059ec..06cd675572 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -259,6 +259,8 @@ option('xkbcommon', type : 'feature', value : 'auto', description: 'xkbcommon support') option('zstd', type : 'feature', value : 'auto', description: 'zstd compression support') +option('qpl', type : 'feature', value : 'auto', + description: 'Query Processing Library support') option('fuse', type: 'feature', value: 'auto', description: 'FUSE block device export') option('fuse_lseek', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 680fa3f581..784f74fde9 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -222,6 +222,7 @@ meson_options_help() { printf "%s\n" ' Xen PCI passthrough support' printf "%s\n" ' xkbcommon xkbcommon support' printf "%s\n" ' zstd zstd compression support' + printf "%s\n" ' qpl Query Processing Library support' } _meson_option_parse() { case $1 in @@ -562,6 +563,8 @@ _meson_option_parse() { --disable-xkbcommon) printf "%s" -Dxkbcommon=disabled ;; --enable-zstd) printf "%s" -Dzstd=enabled ;; --disable-zstd) printf "%s" -Dzstd=disabled ;; + --enable-qpl) printf "%s" -Dqpl=enabled ;; + --disable-qpl) printf "%s" -Dqpl=disabled ;; *) return 1 ;; esac }