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 0A15080031 for ; Wed, 25 Nov 2026 01:26:45 +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 6AP1PVon002455; Wed, 25 Nov 2026 04:25:31 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AP1PVon002455 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1795569933; bh=JHZYJy8PECFzsU4Z1SMehXcZ+AP/b8bs7RFbm8RgTB8=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe; b=AWX+iK6lAGtH2OmIzvrJ0ivgxqcWsujzxK7efEofy4ZBpcEjPP+BOoo8wUG4fukWA Sa8kpv+LcVUioi9ZCqHxa1iCqwJoosYhdF44aNtXd8o2MCnBjB0EF+OZT2g/jhcrBd FUnK51mE18ZyrCSsQDUm6B3BHnejBHqDYJ0RLB3h/Q+X9XZrpQB1NmAE4GYUXpKXcI CzzQauiQpMFS+p0s47tyI47t8WV4fQC+Yy6dVYWKrMsueGtnNJdPRjAFgZxBwqC6wp BJ/x3+rwjBtWm9se2yaah2L+XsdV7IoRBAewwnf1DAi101PEzyCwFIeMFnULbmfUFi e4iYOlZUU+wiQ== Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AP1PUCR002447 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 25 Nov 2026 04:25:30 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AP1PUCR002447 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="Yy7ejm1d" Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-4901562b819so3742473f8f.3 for ; Tue, 24 Nov 2026 17:25:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErFMMD1khUh+WRdUWE6IhJ3vk3RA2BF6de8e9H+r5zyx/A0MSeNX9fw/RKwpCi4F8tBGoUfLGg==@openvz.org X-Gm-Message-State: APuU4Z+yd8HTrzo/NVzXeSls0rPZi20TNisZ6z7EvG0c9V8OxP5OOat7 vPyneG5uIb/TPN9Iqx1fTAz5KTCOOGMZUExbZ2vCe7hF0YM5HHj9waf9LdLqKWMn43rpKHKGHoA tjpm5gGr9v/NjiUqbpERDpx74rnly6I+eYavUvL0xCpmy3fIc/Z2BaQ== X-Gm-Gg: AZFdTZfQBjJzrmgHWrzdDuy0Chx5qGSHEAQb6Vwa0VzXIdVryyhagztcBbhpBLsJ7vw BjTRfjUq/N0Zzao0elzqCvJhuRGLjiXicxZ7mWSAvCVFOwf/pDr/xsKAys4jvflYa7D0Jfs0iEv mF1q4sEmHGL6QOWWUYdeuuF5FK9xxaClKZ9MVAev39qRmOZKuAyMf5XGcHmvn75pCi1tj0PF5U/ lJiykBy835/IZ1ZFp+1eM77L/RoFFAxp0+oBB0ufN6HgH3N/Me/p1wnCUjn+s9hofbtpqOZ4okK PeiRaQUj4w== X-Received: by 2002:a5d:5d0d:0:b0:4b7:66fb:b098 with SMTP id ffacd0b85a97d-4b766fbb5abmr7671500f8f.20.1795569929961; Tue, 24 Nov 2026 17:25:29 -0800 (PST) X-Received: by 2002:a5d:5d0d:0:b0:4b7:66fb:b098 with SMTP id ffacd0b85a97d-4b766fbb5abmr7671486f8f.20.1795569929598; Tue, 24 Nov 2026 17:25:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795569929; cv=none; d=google.com; s=arc-20260327; b=UeXJ2D8atHUUkRXmkPJQkAthCT0ImtDUEZ/PBG6m2759ytQR7ljM9E790b4kcwcbqi mY3NHw2wPtRKaH9FUU5D4foCSAQF71JBseBlFMy3z5RSWEwQeZMe9Nwc8LDElFlMXl1x M+2MCnl7o/WYxptw5837Do3p+P4jWYvsxXMoQV7OdhJvbMD0L4vgiNlRSwKqoUL8H1G+ pQnzN3nWAzx1rnFc0oq8i5RtbvMG2g7TUmSwWz8TYRbgntL3ierih1dh7pd5kxAcR0XO i82uDFPrQmYnw+0AXo135TxmEyOJml9viVWIMvNoyLzBPnzeMEM0Hz0a2tO+hWEjv6Ns lmVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=MEAOJzxGkHMl0gz7RorlKA562lkrxRxndB6aFKMtEfU=; fh=pycTr8lxkBrSts2tWnCCDoCRhRmWwrK7NLJgUUzizTg=; b=HGJmYWdjTOE455QEwMGq+TwmeX2VJsQw4OwXgUTRJuDfzZ3lkkH+fL2qQpBqaOtm1I udNSd94GlQmfbYz9ZkVsdz+ljsXea1c4JdUUmHH6Lt7gXy2vW/rno8g3NmFiRWuj+NZR zyVPsWGq7SeL6SkDNaE6nOImZg9p7im3alvw9IJlXTOtiYJukEnRArZnbYx3LT9H4nA3 u7efSh5E1NyTK3esjYGEV3GlrIa9EoyfY418EKCgpH6tqQz8X5H6LXvwaZrW2XMe0Mu+ aQzZyA0bBLG69tAvoAakeT8Ig3GFh9xdk/l4wp/NGArbrx6q4nk9sYjIapve+Q0CqUYc DTlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=Yy7ejm1d; 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 ffacd0b85a97d-4ab6b7c1e16sor2557444f8f.13.2026.11.24.17.25.29 for (Google Transport Security); Tue, 24 Nov 2026 17:25:29 -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=Yy7ejm1d; 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=1795569929; x=1796174729; darn=openvz.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=MEAOJzxGkHMl0gz7RorlKA562lkrxRxndB6aFKMtEfU=; b=Yy7ejm1didKC793OD37Y7kKujdKiC/hjcarRr72tIw/DfoHY+QdjGCDoxNHEMFZwRz 8fORAZLoxWkT80N9bXvm/UEGI/m4OHsB/5BJt2WYIychlecVTzW3LsquLB7AxP/MuC/E NOSDAsYTXH7V7rTI8Mnd3BIimuqARYzKy6zRzn/pGUh01NJp0tTP7NPR7ce6oft71YxH wC90ItAp8NEJKTZm8QqWmjD6RE1r6AagUbKrbgORgd1OtVNFUW1/7PbT3RasGJL5Idun U3v2vzIuStOcMozlPJpDTlc/twrR52VJ+w2nJsuwjqNSQPlAICuGs46gCzq8ZIyovw+Q khgQ== X-Forwarded-Encrypted: i=1; AL+hErGAAr3J2TkRhqEMp1yQ5CV8tpgKtMaTcqudqJCqn5/K1thErTU3ma9DVD9RVMINzzrESpOFQg==@openvz.org X-Received: by 2002:a05:600c:e40b:b0:4bb:9a6c:8712 with SMTP id 5b1f17b1804b1-4bb9a6c8724mr120381175e9.12.1795569929076; Tue, 24 Nov 2026 17:25:29 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2026 17:25:27 -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:16 +0100 Message-ID: <20261125012525.681662-1-den@openvz.org> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.2 0/9] dm-qcow2: lockless fast path, direct completion, no I/O scheduler 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 On top of Andrey's "dm-qcow2: per-qio fast path" v3 [1] the fast path still serializes on md_pages_lock and deferred_lock, every request completes through BLOCK_SOFTIRQ (usually in ksoftirqd), and the device runs under mq-deadline. This series maps fast path reads and overwrites without md_pages_lock (a per md page generation counter, md pages freed after an RCU grace period), submits without deferred_lock, completes dm-qcow2 requests directly in the worker, and makes dm-qcow2 default to no I/O scheduler. dm-qcow2 and dm-ploop now requeue a request instead of failing it when the request pool is empty, since without mq-deadline the queue is deeper than the pools were sized for. The series applies on top of v3 [1] rebased to hci-8.2. The scheduler default is the largest single step. mq-deadline caps a device at 256 requests in flight (2 * min(depth, BLKDEV_DEFAULT_RQ)), so a guest disk with several virtqueues is throttled to that regardless of its queue sizes, and its dispatch lock serializes all submitters: v3 under mq-deadline does fewer IOPS with 24 jobs than with 8. dm-qcow2 does not reorder or merge anything the elevator could help with, the backing file's own queue still has its scheduler, and IO limits (blk-throttle) act on bios before the elevator. What is lost is I/O priority class arbitration on the dm device; mq-deadline can still be selected through sysfs. 4K random I/O, iodepth 32 per job, brd-backed ext4, 1M clusters, fio jobs one per core across all NUMA nodes, the same patches on the hci-8.1 kernel, kIOPS / p99 us: v3 v3 this series (mq-deadline) (none) (none, default) read, 8 jobs 550 / 848 1554 / 578 1836 / 191 read, 24 jobs 384 / 2040 1690 / 1401 4308 / 214 write, 8 jobs 547 / 971 1353 / 627 1663 / 177 raw file on the same ext4: read 8 jobs 2162, 24 jobs 5377, write 8 jobs 1859 One job, same columns. QD1 as kIOPS / us per request (1 / IOPS) / p99 us, QD32 as kIOPS / p99 us: read, QD1 80 / 12.5 / 11 87 / 11.5 / 11 105 / 9.5 / 8 write, QD1 78 / 12.8 / 11 83 / 12.0 / 11 99 / 10.1 / 9 read, QD32 258 / 171 320 / 114 359 / 102 write, QD32 256 / 167 304 / 129 339 / 107 raw file: QD1 read 3.5 us, write 3.8 us per request Tested on hci-8.2 (26.4) in a VM: ploop-pytest for the qcow2 and ploop formats, data verification under concurrent read/write/discard. The same checks passed on hci-8.1. https://virtuozzo.atlassian.net/browse/VSTOR-95494 [1] http://lore.virtuozzo.com/kernel/20261113111126.793039-1-andrey.zhadchenko@virtuozzo.com/ Denis V. Lunev (9): dm-qcow2: move md_pages_lock off the deferred_lock cache line dm-qcow2: free md pages after an RCU grace period dm-qcow2: map fast path reads without md_pages_lock dm-qcow2: map fast path writes without md_pages_lock dm-qcow2: submit fast path qios without deferred_lock dm-rq: complete dm-qcow2 requests directly in task context dm-qcow2: requeue requests when the request pool is empty dm-ploop: requeue requests when the request pool is empty dm: default dm-qcow2 devices to no I/O scheduler drivers/md/dm-ploop-map.c | 2 +- drivers/md/dm-ploop.h | 3 +- drivers/md/dm-qcow2-cmd.c | 10 +- drivers/md/dm-qcow2-map.c | 182 ++++++++++++++++++++++++++++------ drivers/md/dm-qcow2-target.c | 43 ++++++-- drivers/md/dm-qcow2.h | 33 +++++- drivers/md/dm-rq.c | 22 ++++ drivers/md/dm-rq.h | 1 + drivers/md/dm-zero-rq.c | 2 +- include/linux/device-mapper.h | 5 + 10 files changed, 260 insertions(+), 43 deletions(-) -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel