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 C90F080031 for ; Wed, 25 Nov 2026 01:27:03 +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 6AP1PpAX002603; Wed, 25 Nov 2026 04:25:52 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AP1PpAX002603 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1795569953; bh=s8MwLpvrHAB3//C3F1Ol6S0ib7V8tJXanqeoGz9AuVM=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=bO8/JnKRjLivQnnwxBpEy2m9bwJdsJ3VorCtSBPqTpsudzz/kbgnKK9iZyGJAvxrr BIUhCYR9G1e3c2Q6C+Z2jMqEnv4yT14Qy9NF8i/GvaO4VbU1sWvMbsjf6Azw9kA2Ic U9Zpc6XtCqOgSxIdqyWCmhCMIgeeW4/MROuPxWHTrBhC9HmIkgD1zgcwIfxdkxStI+ tdSWAvyCNwL6WS3xbQ3bGggmybaLJuKhYRVyrIagOHEA2sVdKl8WQ2X6qhF7fzpyjW uFFn9XY6tahfVrf348+hgijGa6Jdw67Nd0uDPo6rD2REgKRhVIPr+fNuH1xJkKMx53 8/xqQx2aTRe7Q== Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6AP1PcCq002514 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 25 Nov 2026 04:25:38 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AP1PcCq002514 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="X8Joexer" Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-48e0af48c18so3109767f8f.2 for ; Tue, 24 Nov 2026 17:25:38 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHmZQlCqJnTQ+vtvLqSEUdWL4T/EP8L0r4mcoUHdCXXdLvIdCnYG8XgDyRmo8rti9pG5PR5Bg==@openvz.org X-Gm-Message-State: APuU4Z93eo2/xVOgv6s6X6W/YgxcT1PdKXBmDvauz5g9IX93PETF7nlI Hhzc3T6Oqn4/vHvYPG/k447OVsTHnIu7mjmkEyGorDFxmzv2KyXVJYzZbKXaBi4Q5ls+4c7k8rY EkVr9OhqURALvymuR7mb5oluEyhbB/axQ+s24X1sVlD3AwdXSpAVj0w== X-Gm-Gg: AZFdTZc6Y9IMLVbMFUpTd55PSBHNkMrWq7YI0Cju5qcrR1SNs0dZf2PDy+wqngzUPBG dP1wroeWGcfxriJ6ZQ99E59wUCfYJ/CqXAS1nLxMReqdoE7qXfDNabLsJ5szdEC4auSpRRnXQpQ SS7LLEJyxCKB6bOf55gTJooeS0R3DfVg9vubOFFBeeM1mispSgPcNC9HzvVYkB+HDrMxN6cc/i1 Aws3WAaPqGgBOi1LSDN6kqAGGhh+YRHOiDirdoNmCcLN/TXcJehjhDKTeWgb3tbjcCjO8ShkZpI h84SyMKc6A== X-Received: by 2002:a05:6000:2997:20b0:4aa:d196:f325 with SMTP id ffacd0b85a97d-4abb7f2ee9dmr22123246f8f.40.1795569938285; Tue, 24 Nov 2026 17:25:38 -0800 (PST) X-Received: by 2002:a05:6000:2997:20b0:4aa:d196:f325 with SMTP id ffacd0b85a97d-4abb7f2ee9dmr22123241f8f.40.1795569937974; Tue, 24 Nov 2026 17:25:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795569937; cv=none; d=google.com; s=arc-20260327; b=PW5ZiBePYc4LtYvln3KR37iCl20IHAa/2qvQaEcJZ6cwrO90g4OHHPEVpAJlo+nBYU CIXw1O877FHzCa8Y/oBhCjFAQnW4THnmV2dq5maGl+3x5pBPIJ0BVTagGynCrQc7hGw6 HryIkbkwxpYfs2KNq/8A8WOe6ti/82EdEMLeK444giANvhQt/98p6evNtZMi74qO04jX PahqOqcs6g+fwtBxj8uEs82j51r2rBqrvK+mthEK83ALCshQiDQTW/tsCRUw9HY7X/IM RrJlvKdfJUQzj8ZXgMzVhacBRJtUpmezFOMlrBmbW3Bpe6uH5uXVvyP2eldXiM0OlFw9 xkzg== 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=XgW4lggzKagzgUBYvV37PAU+WC69UzFu2+vTo1YVf+4=; fh=xEdNloYUK5PXg/AK4/+cTNJx/WdjLx93//e/QT5JNO0=; b=oFLzYRgpQFwosvczySh7uLnV0y3Aq5s60drmiOV1MRg2UTh6Z9cG0tKctXIwoxTj4j CJI71MOyz8vlw6Zq3w7H1FJtvjchADzrY4+h+RMcfoQw7GBKRV2b2MQae2zcVGPuJhXZ 5qMgXBq4gxtsPcIUR/2sB+J/pLmFx8zPgKyaQwaoQNkYOWMJ2sT6DVjuOVDK2F5tbUVS aPu/ygcKRFRV0hi21uQseHJ/yYygW3LR9LiJAS+or74yk1yqWsJoRAA8+PvyTUKdn9Sy z4TL41jiEe1bIB2dVGFu+ShXkjDQgGVN/qjdqzdfnj8dG7/W2y3YjL8viwcJ5eemnmFs GRIg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=X8Joexer; 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-4ab5e31599fsor3748922f8f.3.2026.11.24.17.25.37 for (Google Transport Security); Tue, 24 Nov 2026 17:25:37 -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=X8Joexer; 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=1795569937; x=1796174737; 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=XgW4lggzKagzgUBYvV37PAU+WC69UzFu2+vTo1YVf+4=; b=X8JoexerUn/nEMiy3OF/16xdoIsg955vPkIiUF+m11dZ4irODCVsCMsKBMutCUPotF yEf6UCuyw61U9/MiWzsgiPjkbH7n+pnNjTBQMIDIoIuaMSrCXalAdcm8Qec4RW1hMNJf NhLyn2nL0htxb/My+QN7HrPPug9X/rIA4K0/WMY/x6C7Fn5kuhK8etZzF9DBKr/4utvq cdVbA+qgev0DPf58TIaVN6Uy0XKx2aqvfRZ01PDM7JiUauGjMKMUF4EIvCGWC5lKgoEn eHtuKDPEq/vxqoarOSdbVy8WxWPsl8Z1YSKx9fm+issc9oYknzU/cn0VaCt8LvMzIMYd Ztow== X-Forwarded-Encrypted: i=1; AL+hErF/mfnZcEu4aeZNNW3gSBEB5Oy+IC9sTDuIZjMR9xG1cPgUm/N/g8WdUIbd1Mqk2ao+qpQ/UQ==@openvz.org X-Received: by 2002:a05:600c:1549:b0:4bb:6a2d:b440 with SMTP id 5b1f17b1804b1-4bb887e0699mr335800525e9.2.1795569937608; Tue, 24 Nov 2026 17:25:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2026 17:25:36 -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:23 +0100 Message-ID: <20261125012525.681662-8-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 7/9] dm-qcow2: requeue requests when the request pool is empty 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 The request pool was sized at twice mq-deadline's default nr_requests of 2 * min(depth, BLKDEV_DEFAULT_RQ). With the default single hardware queue, even a request from every tag could not exhaust the reserve. Without a scheduler the device has dm_mq_queue_depth tags per hardware queue. If GFP_ATOMIC slab allocation fails with more requests in flight than the reserve can cover, qcow2_clone_and_map() kills the next request and the guest gets an I/O error. Return DM_MAPIO_REQUEUE so blk-mq applies backpressure and retries the request when resources free up. 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-map.c | 2 +- drivers/md/dm-qcow2.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c index d1dec85236b8..c450d1de5689 100644 --- a/drivers/md/dm-qcow2-map.c +++ b/drivers/md/dm-qcow2-map.c @@ -4938,7 +4938,7 @@ int qcow2_clone_and_map(struct dm_target *ti, struct request *rq, qrq = mempool_alloc(tgt->qrq_pool, GFP_ATOMIC); if (!qrq) - return DM_MAPIO_KILL; + return DM_MAPIO_REQUEUE; qio = (void *)qrq + sizeof(*qrq); init_qrq_and_embedded_qio(tgt, rq, qrq, qio); diff --git a/drivers/md/dm-qcow2.h b/drivers/md/dm-qcow2.h index accac35fa345..dce623ccc78e 100644 --- a/drivers/md/dm-qcow2.h +++ b/drivers/md/dm-qcow2.h @@ -193,7 +193,8 @@ struct qcow2_backward_merge { struct qcow2_target { struct dm_target *ti; -#define QCOW2_QRQ_POOL_SIZE 512 /* Twice nr_requests from blk_mq_init_sched() */ +/* Reserve to keep requests moving when slab allocations fail. */ +#define QCOW2_QRQ_POOL_SIZE 512 mempool_t *qrq_pool; mempool_t *qio_pool; /* -- 2.55.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel