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 D3460803F6 for ; Tue, 10 Nov 2026 11:52:32 +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 6AABpDX0014492; Tue, 10 Nov 2026 14:51:14 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AABpDX0014492 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="TlkxYviP" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AABoxpg014452 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 10 Nov 2026 14:50:59 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AABoxpg014452 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48e0461e040so1543869f8f.0 for ; Tue, 10 Nov 2026 03:50:59 -0800 (PST) X-Gm-Message-State: APuU4Z8j3Ktk2ZY/pxf4i7Zr+FFO6QEw+hUqRQrj5f6UrSGe6teRDW7d pl6xseMLpwfOC5bx3j8gJt99biGR838DlIx/Y1gADHrC2SGWKcRYXBpDhP4637XgsuKoAxi3xXP oJdNrfM1zmcsY5DxkxduilmPJhsMwlJpJesVdmfZzJd/oprOzwdiKMA== X-Gm-Gg: AYBFou0LD9La/u3W9R5i2dS9zLlZgb3GY0DFScylr4omRtOQYqNgKhD9HQwVwq/7pri l4Fs7T/ajiCM4OEj6okFeISG9Np7uuN61j9CgFjH0pjpqaeU2xQ3OLLI9k6rvTgZAnmpVafbtBL dy33soiunezJU0COH+FWtbNnPkhp6EJ3B8X3JiKN2jAJ7UHHt82+9s8QcCym+WDep2mpFIAItN+ aEKAoJGBc/4m8vlO+F5Y18Zh2djzzHsqANxbOvGoYK2hanpr8bTSxEyNj/88WmLYT9R2JtrG+S+ QHqMITC+wrUw7bA4CQ3B5J4Pk+D0AYIqpZIm+PpwNA6H9eFQoBIjWAVPsNeRLq+as1p/bA7N1Zp LVkYOuCbLWbaMBAprIKJtuSSX9N0+xA== X-Received: by 2002:a05:6000:469a:b0:48e:fdd:41d9 with SMTP id ffacd0b85a97d-4982f968989mr2490916f8f.31.1794311459070; Tue, 10 Nov 2026 03:50:59 -0800 (PST) X-Received: by 2002:a05:6000:469a:b0:48e:fdd:41d9 with SMTP id ffacd0b85a97d-4982f968989mr2490885f8f.31.1794311458502; Tue, 10 Nov 2026 03:50:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794311458; cv=none; d=google.com; s=arc-20260327; b=bLexw/qcs+oLZEASyfAM6iRsFYJsOwFaTW7A4tA1uTGBCU88OaHjLEBdRrqo7/XSnq ZjQOw1LDE9pFuNJ7++V7LWUpkrdvVc61zlOSemagRDPClfu9eph4Ey6Lk4qiOETwGig6 yw26GRC+ORKYJje4sIuZEzQ+YpN4kwhk6ibXeda7ROjTDXmJ7lAdS0rRzNRIWSMAGN14 Qasdi6dgayhOQDfXtxh6JJ71wM4D91DKNwLLFULHQsNlYCBhLQE+rrmmbiSe9IbaoDoT bPmvmFZviJRDQcSOVgb6ce5hECWeOOXNWGiGXjKfsj78EMHUmHLeMwVAumgOPNfnaMTp UKmw== 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=PPC4Dz+7Ic/h6qwAM5ZoukAfgYkJdCM2sId9ovlBOmw=; fh=ElTTnnNtphHTCCOZ+58STyaWac7y7ytLDJZIF4HMMJ4=; b=hGWonkhauxCpM8LupAcsLtkSmHnY40wfckURZEKOilawLT2/d8H0+UlxgmIshI3CzT roDDUMblnZKvUijWftV/XzyW/XPh6pJL6YeCj3w6YL9TCgU3TMS0HPT1RxZeizodHk5Y XNB0oUkg54P0SR9dYRat9AEgwfXil4h7dhrWo4Ld0hzkJn7jyTnkzELN4kHepiWWt+9D W4yhV0kpa0fJ2DMljzkqv71OXrW22Qhj93M1NUwlERlIMg3ru5FKNc2pWoO9s85sPM2v yGzIcGOCn/pSuvK5P0w3fN5Vao9fRoTbPOFuxEFa0N+5mnwRabIPX5CLb9HVO15RVJQ5 GkFg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=TlkxYviP; spf=pass (google.com: domain of andrey.zhadchenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=andrey.zhadchenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-4983847ca44si4623026f8f.486.2026.11.10.03.50.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2026 03:50:58 -0800 (PST) Received-SPF: pass (google.com: domain of andrey.zhadchenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=TlkxYviP; spf=pass (google.com: domain of andrey.zhadchenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=andrey.zhadchenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=PPC4Dz+7Ic/h6qwAM5ZoukAfgYkJdCM2sId9ovlBOmw=; b=TlkxYviPT7ak EQD7G45iZKDSfL2Lj+l2f/rYvkG5WH1ikTR7DZCUhTgHDJJ5LC8FvIy48nDGiojCwyLNyRg+zo7ow oRGVfXuDS7yFDdG3v5tNqScDFLHchT5hceVNjYcaJzzJmrKumRmgG/P4O10DD+6KGYaim7vuRVdq9 B13+HPSRxJHTvAWI968MEu7GHYRrMEagwTtXdHmKCvYFNWoUXW50HrPL2tiVMyFCOgoe2SUsSu3TY nI5GmU/d1seAIto+ydgnPYyqnImf2Tzcm9JZ7u9OKh8gsnXjAzMe+Go5IQ3o3NPn5RUNsWDxLRiFW jZx78QoflXx3uyk6lv2VWQ==; Received: from [130.117.225.5] (helo=vz9-demens-1.aci.vzint.dev) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xQkJI-00DBlM-0p; Tue, 10 Nov 2026 12:50:48 +0100 From: Andrey Zhadchenko To: khorenko@virtuozzo.com, alexander.ivanov@virtuozzo.com Date: Tue, 10 Nov 2026 14:46:22 +0300 Message-ID: <20261110114629.416695-1-andrey.zhadchenko@virtuozzo.com> X-Mailer: git-send-email 2.43.5 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v2 0/7] dm-qcow2: per-qio fast path 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 dm-qcow2 processes every request sequentially in a single kwork. Unfortunately this introduces latency and cpu-bound limits. This patchset adds a fast path: right after splitting, qios which need no metadata changes are processed outside the main kwork, in parallel with it and with each other. These are: - reads and writes of fully allocated clusters; - reads of unallocated clusters, which are zero-filled or forwarded to the lower delta; - partial discards, which only punch a hole in the image file. Everything else (allocations, COW, compressed clusters, discards changing metadata, backward merge) still goes to the main kwork. Fast path qios are batched in per-cpu llists and processed by one work per submitting CPU, to avoid queue_work() cost on every I/O. The target also declares DM_TARGET_NOWAIT now, so io_uring submits I/O inline instead of punting every request to io-wq. Patch 1 fixes a race with md page insertion which already exists between qcow2_llseek_hole() and the main kwork, and which the fast path makes more likely. Patch 2 makes perform_rw_mapped() safe to run in parallel with the main kwork md writeback. v2: - patch 2 waits for L2 writeback, so a fast path write is not acked before its L2 entry is on disk - batching goes before DM_TARGET_NOWAIT, and its worker no longer loops unbounded - measurements moved to the thread - subject prefix changed to dm-qcow2 Details are in the patches. https://virtuozzo.atlassian.net/browse/VSTOR-95494 Andrey Zhadchenko (7): dm-qcow2: repeat md page lookup if it was inserted in parallel dm-qcow2: wait for L2 writeback in perform_rw_mapped() dm-qcow2: prepare process_one_qio() for fastpath dm-qcow2: add per-qio work infrastructure dm-qcow2: implement per-qio fast processing dm-qcow2: process fast path qios in per-cpu batches on a workqueue dm-qcow2: declare DM_TARGET_NOWAIT drivers/md/dm-qcow2-map.c | 245 +++++++++++++++++++++++++++++------ drivers/md/dm-qcow2-target.c | 12 +- drivers/md/dm-qcow2.h | 16 ++- 3 files changed, 229 insertions(+), 44 deletions(-) -- 2.43.5 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel