From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 3411D80031 for ; Wed, 25 Nov 2026 01:26:47 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AP1PYJj002480; Wed, 25 Nov 2026 04:25:34 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AP1PYJj002480 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1795569936; bh=P2j/Os8JNv6C6Nv6LQXa1j7dMOWd/jSWRYwOqVDril8=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=sS8M9HfcctlPea15tTuf0AKt0ziZ3QnNpr1Efb7gwDzmRAs3XbOUuFRo/F67SGFd1 S5CZ0RLjjM/ctyYKsqqwewicWNnfmmr2mMfonyRsZMeJBtxwbbtwMT/FbWSNb8LmKa HLZdN5R4UhKfHB6ZclPFQTNtafHzWWBEP4Bx60SwpLXJ7MojL6q5iji3yDr4elemT5 Uq1r8WpIzdJp0Byf6oP3kUcCbcldQR+4JQXyS49hwsqOU8EdW+Mo1h/mlA8QKzY0J4 CNzkjSbcDMneT6mOFgIFL7v19fS4CRNypnhRgCP1YT1mfE2RXWxRO6mT1Q0h14Mv7/ FeC4raB7SiHgQ== Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AP1PVME002458 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 25 Nov 2026 04:25:31 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AP1PVME002458 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="s1PU/Fr8" Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4bb64c99bb8so41168615e9.1 for ; Tue, 24 Nov 2026 17:25:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErH6gX25kuuQdWyyWNqSZRcMLv2ETe/JpIySVqzStvI/KxiFXBAC8Ylz0I2HoGbavPiY8d5UMg==@openvz.org X-Gm-Message-State: APuU4Z8TwxJO5f5HJpRT+2Sn7xvmdvQeTkCHxN7JNeqvb29CKVb1iNDj gvsrwl8YO9XrQvzCPVk5rQvrf56rcOaCqMymZZba60235m2ARv2WnOd9Z+zoJScrJ5li/tKg4oW 6LmtHrTRx4S7z14DbQYTOxp4q49UlQT/PGVCOQo7gn25BXbF/kebRQw== X-Gm-Gg: AZFdTZfU1Hsh1AzAA6Mmo3d8uFf0zVhcZJs7GnL3toiOKApcFUsJ6Pi5MdnpqaN50AK W7g6e1e3yAPcYybrS3vLZAey34izOkSYnobWGapw3phdcB2XPX6WNmGFQJ0KQ5wmM+e5nhAUVe0 EyUWoD/1FYR15r0E12nZJPKS8eSuxyU1C+mmWCP8E5ynGwuix7wiXidgaKU2KZ3A41yR5K4ANgS wGjmRrzrD0SishJTca4B0dt7JUWZcsClBQha5UK2EJ3e2BsyhTiwEGL/TN7TEXfGt1OeCMQF++R gwgkZBkStA== X-Received: by 2002:a05:600c:64c7:b0:4bb:68c4:2044 with SMTP id 5b1f17b1804b1-4bb887fe725mr312392705e9.11.1795569931516; Tue, 24 Nov 2026 17:25:31 -0800 (PST) X-Received: by 2002:a05:600c:64c7:b0:4bb:68c4:2044 with SMTP id 5b1f17b1804b1-4bb887fe725mr312392605e9.11.1795569931157; Tue, 24 Nov 2026 17:25:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795569931; cv=none; d=google.com; s=arc-20260327; b=aii0FacS2lYrpcPrRJ+ZFyJ+krV4yZAbaBCI+ii05H3N7wE2U5OTxQw+uxLmB73KvU qSs15rcVmK/LvmH5BRBy//bLrdVoeOolWvhl6W31+u6iH8hJ3qrXn9XAex5ZL2d3I972 iNgDtuUlqF5LeKBkr8miB1eAxAEazt+xdvGE8jIcId9UgZTHCs/EPlOkpJeA1NdeyhK0 dd4yHu4SSvY9CnI4jrKHee+P2jYFdJaOl9eENdplEI24lh5lw9jLdnoch4sKJWIvo4Wr IwFXPgD2qVsr33uRM5prST0MnWuBAJA4ZlI0HPV5s912U0QZaPwFq6zHEDsQdIqtE2XI 8a4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=F/viOCeQFqA2gXKXbODct+mtf7AGcoPMVA018xAv0TE=; fh=l5vLQZ4MaxIredG7TpnJzeJ2E4TB3XL6dV1TJScE6rs=; b=pilvJQYRlKOp/62G7K5UFYuPLeNfjaEtAdHw8jFLJvgWql8BgqfGe84JQ28xZqt0gK Z4uFe/DEW91LnS+Ii1C6QYcNumqZyfck6ZBktOGgr/DkwatCn+FCfCVescQ9NS5ha2vb +sSu8v24VQ0SjNUVoB4+5C/IfhGjedoCaDGZXTuEcrtzKY10eKtDLQ9zlhj7+WWOq4WD +DNNeWhFYYmEvevY6bao6L1q1pgEYgV/l7O1ioUJSbDUb71CSCPGyrKMcAlyllpA620K 2e1o1gew1GmVVTBS0C3f0VUo1rKRjmM14ZsDMWTsx/SidYUyiUC+SabA6Tc2VnsydMLf zzZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b="s1PU/Fr8"; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:fc:665c:9984:4e97 as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-4bb8875fa51sor34026665e9.6.2026.11.24.17.25.31 for (Google Transport Security); Tue, 24 Nov 2026 17:25:31 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:fc:665c:9984:4e97 as permitted sender) client-ip=2a06:5b06:b600:300:fc:665c:9984:4e97; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b="s1PU/Fr8"; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:fc:665c:9984:4e97 as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1795569931; x=1796174731; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=F/viOCeQFqA2gXKXbODct+mtf7AGcoPMVA018xAv0TE=; b=s1PU/Fr8GnVWQ4kGqXyl/LvxFfPjCGMPak18a9rvmTPc9M50AkaTcKC8vkjMLBlLoP lkXXIrtvRgZNhSmjYOB0tJty0IQz23B1/akKnK1JG/W+/MNOU21JpUzzhuL/ns3dW3Js Etf4ZDhwGMI66uN08KeoCfV/jmbpc7yNz4HyEuvMcNdnPoWywMTB8GCT2YvxFqiL/TDI a/AUPgLXa60Iq6uOacgCyBBT7g8b+0dTrncCiRwleBloRfZd18+eEp6R1ZgOZaDia9pT m5ejzsPFOKXe+GV1gXGfljuQqs0VDyOugqRAHlfvYtoijpZNuPxgBsj+G83XC+wQDlhF d6RQ== X-Forwarded-Encrypted: i=1; AL+hErEMC4kyZc/fFQIKyo6Sw/Xyrdub+/yccrWw8tiFqZcONKnOWe4mFUYbZOl2+s4ll90bZXksEQ==@openvz.org X-Received: by 2002:a05:600c:4753:b0:4a1:cfa7:e968 with SMTP id 5b1f17b1804b1-4bb8880c73emr343199595e9.21.1795569930756; Tue, 24 Nov 2026 17:25:30 -0800 (PST) Received: from artemis.sw.ru ([2a06:5b06:b600:300:fc:665c:9984:4e97]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb8526cbd0sm623632195e9.0.2026.11.24.17.25.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2026 17:25:30 -0800 (PST) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com, alexander.ivanov@virtuozzo.com, vasileios.almpanis@virtuozzo.com Date: Wed, 25 Nov 2026 02:25:17 +0100 Message-ID: <20261125012525.681662-2-den@openvz.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261125012525.681662-1-den@openvz.org> References: <20261125012525.681662-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.2 1/9] dm-qcow2: move md_pages_lock off the deferred_lock cache line X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Denis V. Lunev Every request submitted to the device takes deferred_lock in qcow2_submit_embedded_qio(), and every metadata parse takes md_pages_lock in parse_metadata(). With the fast path both run on all submitting CPUs at once. The two locks share a cache line, so each one's traffic bounces the line under the other one's holders, and the cost grows with the number of submitting CPUs. Give md_pages_lock a cache line of its own and keep each lock next to the lists it protects: the qio queues with deferred_lock, the discard wait list and the writeback batch lists with md_pages_lock. https://virtuozzo.atlassian.net/browse/VSTOR-95494 Feature: dm-qcow2: block device over QCOW2 files driver Signed-off-by: Denis V. Lunev --- drivers/md/dm-qcow2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-qcow2.h b/drivers/md/dm-qcow2.h index 6c5d3e932691..1647ffa363aa 100644 --- a/drivers/md/dm-qcow2.h +++ b/drivers/md/dm-qcow2.h @@ -286,11 +286,11 @@ struct qcow2 { u32 fault_injection; /* In 1%/QCOW2_FAULT_RATIO */ spinlock_t deferred_lock ____cacheline_aligned; - spinlock_t md_pages_lock; - struct list_head qios[QLIST_COUNT]; struct list_head resubmit_qios; struct list_head paused_qios; /* For pause_submitting_qios */ + + spinlock_t md_pages_lock ____cacheline_aligned; struct list_head discard_wait_list; /* For batching md update: */ -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel