From patchwork Wed Apr 24 22:56:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 791544 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1093190wrq; Wed, 24 Apr 2024 15:58:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVGN0w1NqMFAEFvDHE/m3zVHvXCloHiXnCcEUlp/sSwBbNkVgCtwy0SCbc4zVFCmTUIBgB1csNGPHWwmnuhxcWI X-Google-Smtp-Source: AGHT+IHaUaesvTLLAOcc4xuwoD+VO1jjPz+Twxrb/UVH2DFdFwnbzTKdiPk2GEWfLmeadcI6Tb2z X-Received: by 2002:a05:620a:170b:b0:790:98f4:62f6 with SMTP id az11-20020a05620a170b00b0079098f462f6mr899216qkb.33.1713999495475; Wed, 24 Apr 2024 15:58:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713999495; cv=none; d=google.com; s=arc-20160816; b=ScJb0fpT3977qD0s6E3M25IRZLeFH323xK9EwIpZLsolJ7kHeKR63Pa2K+T2qxxIJE /B3SZZQ3HQ+/9dxGENX8sDjzOIdKGy3frIRAyaCFOcf80P8AZNZ57Sur/6fRRBkRkrV5 YbOuvs8rvuop1iRDu3k2iPyDQUk48ZjAV9AnrcA8yJBM6s4dEuODFvlJwpGraNv/rz0S ZI49zDrZ4W+C6tI4ThUvPHDvvcljw1ICI+uzSHOWibs7dt8r5FEMdFS1C+gAOmdOi08T dLUv/MQSvgMOfw0zNJptAJqJH3A6PC9RJBa8TR3IsZxf3Ur/wZyt1VourvmET1Dju4tr 1zrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=w21pcEbv3KZfM/OcgeAu4UL167cnBeylLbvFPmblREA=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=mEzl9x/hx3BlZ/vn7IDuFs+uD/RdS+5Yah6CvZWWVDcMjpXg3MbeLCOwkNCRI/ftP2 TAIkfzP4gKQWxiZKj+sSYxpjCQ5CTqllD29RWcC8ITPJxJK39NpasXBFo9VgFS/S7Mrt D6Q9bLHaboXhBUzW3DUHsjLSw59pbf10UhTOywhV2tu9Gi232/hWakXLm4lTDO8Pzsgx MSDgRVj8TlPyi4UpzBv/hUyWP7sv+DAyjcTwgjYR81j3bkgwr70hDOGypfL/NtQRIdoI PBWuXBfNlT3poLY8cVD+9fBNJMPLD5kP45xyLZC2QgMkeuKMPELEf/fED9XcD7uwOQ33 PPow==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yC8OuspV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b8-20020a05620a088800b0078ef8aa551bsi13645926qka.126.2024.04.24.15.58.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 15:58:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yC8OuspV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzlYA-0005Ng-El; Wed, 24 Apr 2024 18:57:14 -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 1rzlY7-0005Mc-LO for qemu-devel@nongnu.org; Wed, 24 Apr 2024 18:57:11 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzlY4-0001lc-RX for qemu-devel@nongnu.org; Wed, 24 Apr 2024 18:57:11 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5d3907ff128so321529a12.3 for ; Wed, 24 Apr 2024 15:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713999427; x=1714604227; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=w21pcEbv3KZfM/OcgeAu4UL167cnBeylLbvFPmblREA=; b=yC8OuspVEZ++lZbIb2MwYUUAoK7sl3bjHDyCSJpKnRy8aJiC8KJEn1tO2ddiLxd60K N3juFieYMjL/ctiV7E2lmqjZSA9EsnhDP/2r+81YLC9Fyy0FOBpAXq16sb15/lG3ppWu Z3PU7gCMb7ENEHbedpJLAuLCu6TT2eRtEsjMSGK/to73C8VrgqQbp0a2Wp0i0m04TrFO ZWnd9AR4SjMMXEX6lpCrtM6N9cmZVQGBoZdnre+kyhpxp7XTZAmB+gdxXpnSB1Uj+5QH Qxc1xsuqsVczfEBIR9q/MgMa/WP+Mllro3leQvgLh3r2Loqm+3tE6LgiOPcvz96PXs08 oyHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713999427; x=1714604227; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=w21pcEbv3KZfM/OcgeAu4UL167cnBeylLbvFPmblREA=; b=LjyjQvI8oOoWxYwA2rONx6ovh+B6DMW55UOyHe5NjTLnoLKMBoFSUv/EEKN5ivXyu5 /7wHR0hVWuHKzO+XT/s3+d9FnYyuVmTogKQzUyQf/YA0+Caaxm6fMmAGm+tNwHbK5ExJ oGB881mnS4gmGuzX71ZpdHCPjFcdCVoxkKnZAHtaG+ljMYepsPoZ3yKN4bb+EKqZhMUE KM3vXYOmPx0cT8UOWYEgCkg0D6iWU6iGyc78jGbeAwY6mFBX3z//lzTuS3198SdT0bKs AS79O6MpAjf4QfPzYcrjeM1fk3smPcpDgF1FkPOl0JPeCAYgxuMX4euGz9DHpLTiPD94 F4ag== X-Gm-Message-State: AOJu0Ywroi/u2DOxE61/l8H8bEZzBKFwegiUfTdGXnAJS8TwNlrsPfHQ Tcl1W2uVJOVta3rxNdiDIgPIMIg+MNRnIDJunKc9itCBTiROUWId/m5na0SyfeMZ05wSE/j+N67 Q X-Received: by 2002:a05:6a20:158c:b0:1a9:40a1:a4e9 with SMTP id h12-20020a056a20158c00b001a940a1a4e9mr4867759pzj.3.1713999427111; Wed, 24 Apr 2024 15:57:07 -0700 (PDT) Received: from stoup.. ([156.19.246.23]) by smtp.gmail.com with ESMTPSA id gu26-20020a056a004e5a00b006ed9760b815sm11947413pfb.211.2024.04.24.15.57.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 15:57:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 00/10] Optimize buffer_is_zero Date: Wed, 24 Apr 2024 15:56:55 -0700 Message-Id: <20240424225705.929812-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, 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 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org v3: https://patchew.org/QEMU/20240206204809.9859-1-amonakov@ispras.ru/ v4: https://patchew.org/QEMU/20240215081449.848220-1-richard.henderson@linaro.org/ v5: https://patchew.org/QEMU/20240217003918.52229-1-richard.henderson@linaro.org/ Changes for v6: - Fixes for bufferiszero-bench r~ Alexander Monakov (5): util/bufferiszero: Remove SSE4.1 variant util/bufferiszero: Remove AVX512 variant util/bufferiszero: Reorganize for early test for acceleration util/bufferiszero: Remove useless prefetches util/bufferiszero: Optimize SSE2 and AVX2 variants Richard Henderson (5): util/bufferiszero: Improve scalar variant util/bufferiszero: Introduce biz_accel_fn typedef util/bufferiszero: Simplify test_buffer_is_zero_next_accel util/bufferiszero: Add simd acceleration for aarch64 tests/bench: Add bufferiszero-bench include/qemu/cutils.h | 32 ++- tests/bench/bufferiszero-bench.c | 47 ++++ util/bufferiszero.c | 448 +++++++++++++++++-------------- tests/bench/meson.build | 1 + 4 files changed, 321 insertions(+), 207 deletions(-) create mode 100644 tests/bench/bufferiszero-bench.c