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 B3F9A803F6 for ; Mon, 16 Nov 2026 10:33:26 +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 6AGAWAHQ022383; Mon, 16 Nov 2026 13:32:11 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AGAWAHQ022383 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="SKX8CWpq" 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 6AGAW6jN022366 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 16 Nov 2026 13:32:06 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6AGAW6jN022366 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-48e0fc747a7so2070425f8f.1 for ; Mon, 16 Nov 2026 02:32:06 -0800 (PST) X-Gm-Message-State: APuU4Z9Uh4wFpN8UZec5Th6ervFlCWRDvzEDOH314jLp/7DJ5oy/hogL mQ7+a3Aj/Bf0O6zuv7/9215Fw6287GD1sH5ikxCLyl2DTQ/gKvyVY3mJbmDpEXU7BrqcJvdoYry kZUZk9eRrPWm7tssH1u9xXyPmxCL5cHWjX/WlyHvJDZdkzgmDYJh+7A== X-Gm-Gg: AZFdTZctaj4EzqGdXHs+r+o3qqRNkOnCvydcn3V5R8Rkn4nLmGxM2xnmR7gGi7HqT/2 scANWWI8LwJWsZI5J/buNTXZ3hkOHr0lBOxsnq8o9LLp2IHEFo7roZJk2gs3max0MomZBLKoyql zbkCXmGwHVIMxxD+kSdUAaUvOcFMG2OIdCp7DUZOygUhml87ImRt7EHmBAW1VWP7EPWB/MGap6b lfqsuQSXrKHb0Z30mY1c40EAV055JbjQrJw4jSo5l4rABFfwppFv89wPY8iO2ViWzbbu+dxzRnp 1Sr/6LuzB1HpqwCHcOVyAWKzP8znsAeLivr6rtTLnXVqZmvnbR4yVTr3xnlhMUYRY8A2A8zfF2W uNbYuJjdNQpwC+ryFhDpfECfhJKqdZZkCYKjxyjCy04GUGbHymd04Zp+KyPYc1MVatmYNmTObQ3 BTl9faFl1yipTdgiQN3Ky2nu5c1Q== X-Received: by 2002:a05:6000:480e:b0:493:f3f2:2255 with SMTP id ffacd0b85a97d-49c70542714mr20176521f8f.25.1794825126517; Mon, 16 Nov 2026 02:32:06 -0800 (PST) X-Received: by 2002:a05:6000:480e:b0:493:f3f2:2255 with SMTP id ffacd0b85a97d-49c70542714mr20176483f8f.25.1794825126014; Mon, 16 Nov 2026 02:32:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1794825126; cv=pass; d=google.com; s=arc-20260327; b=T3/Eptmcpi1T6nWyO/K1l192UgwV3A8KP5V4DuuPND1bmafNM2mddD07ZIKf7uBI2D naCSkCOY/e0cYtn0XH/BSHoQv4ZtiYMWyT7/U88I1BSdlwbsHL7Y4jcuHeeDCqAwzTKP S+OhwNmTAMJFvkBTJ0h/DW7AYdEPkY5dura3GeamzvucDzOANno9mA0l+ON+8YfX33KX cpcbFYpFQHWrwVvX0E6ukS5KCuOorpHOMlafETq03uRJkw9bTInrKJaV9QK2cP9ZTlJk AS3bejJiSurrnneP44piOGiLc3mUXKG0V97IxkBKlAwVgbB5dppNjpubUmwfrcvAwvcy 9psA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=mime-version:cc:to:in-reply-to:references:message-id :content-transfer-encoding:subject:date:from:dkim-signature; bh=kGvpeCYOp/g8GqKhkdo5jyMKKG7FWt8qPYWBR7Axo8I=; fh=TMBp1cYDjDJ6KUXnve18n42rOCdXEqpN/92m20IcUP4=; b=mL52w65DUjVknJvqVTZzBr5dZmLFlz+ilML2BQwt8rvJN1tIMyu60YPGSbLrio9G3C xGVCZyzyrqjUKUl25BD/YGRJKndBP6Pl7Vd2MeSH7SQd7Py48gap7NOW7gLyApCFvs0i RNxy9xmRL+TLOfwGg0xw3fqpzPF6R/HVKscqNyOZgWkxfv9+/sKliyOhfZoJoForvBO2 vyNwLCR6R1cTgh0u20DSlgMTtVJRzgNGYg/93LF1OM7AO/OUyGRiNq6oYAAhAJIK/IA3 YcaQrdU5Cd8BXHDe+fgTDp5zw0+zjQURHQSTDhkZL0o3PIrGXe7hkQxSqarh0HBilnOD INEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=SKX8CWpq; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of ptikhomirov@virtuozzo.com designates 2a01:111:f403:c207::3 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from MRWPR03CU001.outbound.protection.outlook.com (mail-francesouthazlp170110003.outbound.protection.outlook.com. [2a01:111:f403:c207::3]) by mx.google.com with ESMTPS id ffacd0b85a97d-49c64fd759asi20718531f8f.470.2026.11.16.02.32.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2026 02:32:06 -0800 (PST) Received-SPF: pass (google.com: domain of ptikhomirov@virtuozzo.com designates 2a01:111:f403:c207::3 as permitted sender) client-ip=2a01:111:f403:c207::3; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=SKX8CWpq; arc=pass (i=1 spf=pass spfdomain=virtuozzo.com dkim=pass dkdomain=virtuozzo.com dmarc=pass fromdomain=virtuozzo.com); spf=pass (google.com: domain of ptikhomirov@virtuozzo.com designates 2a01:111:f403:c207::3 as permitted sender) smtp.mailfrom=ptikhomirov@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Wagw34x0aoxJL4m9+Izt7B/akGtYh/aD7MkvEi/g8cBXzAoyGMyFx4bi9uKHAhnAA7bvBARfog3zbDvPapziaidu//9tHU7U+GYSGjNO+/ugN2EosMnAPdqNv3rUomSpTrCMoHaujIZxfUHg+Ir5TIeYhQpLcX+jywUJhnQNgjKcrAbr8vusASodXDw66WsJjDFeiGPmu5tK29lRHIaZxNy+WtgdV/wow6QoGx5JttgLYarKXsm/wuJ8rhRDJCmzzeGquuEsxoFK/7006yraADizjC9azrlUkezoRpH0e9vJdd6aZGVSCnUURBT8qlB6f1q+f6POv+qlTcW0rCW6fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kGvpeCYOp/g8GqKhkdo5jyMKKG7FWt8qPYWBR7Axo8I=; b=Trf9kZkN/EWZ0LEWwJ+n1Ec61frwwk4MI+78aoPrLVEJe4BVDWomEeMN9lsUHmyD5dqcugh9G3pMHqpfx4xealmEPTokn9Vh7fYNk4gutjzY4Nh49pF1MKq8B4vKTls0/+7GMFP7z/ww4MNRaIwgEHtO6olHB94Qn43+RePrEGfa+v72v4YkXgq/SIjx/YbGmod7NTXHATq//oHBqp5Txtp5/q/x9D6lcuvKTkwksP30be9QwucDMMsGN7O2DP521r5za89cIOSzxZPrqcAD00lxssyg7PwLgOyX75ZrPNXc3fOkcOVACNK5NaszyOyL01h+/XFxE+MZyzuddNoZ2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kGvpeCYOp/g8GqKhkdo5jyMKKG7FWt8qPYWBR7Axo8I=; b=SKX8CWpqRDWw5EoSfHIHmy0g47caKWTogW7XVF7NPk0Im9Lkq7C96ypv+yV41InGhd/mFgZdxbpxyMPf/v6MWxOZBTEbPK4Avv/RRMDO5lIN0N0p79zEzRWYLunZqD5MJWvOUmALm9f1RUvnnvjvy+fNXSfCC/WNpkwvElsmCJ7vLBCEpMkz4vJ+4j7l68PUhnfYVCMGu4bK4jXYBQ9WV6xrv1aZK0LE00E2nuZOaoUzpHbR5+FpxMZY4N9qqctpjPfBLKXoRhVhwx8xrYuZYzhc1AMVNu0ESl6SXqUwQYR+C2T81HdxJRMaVF9OqJrG38KYu7maF9RexDqB8OTx3A== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from AM0PR08MB11804.eurprd08.prod.outlook.com (2603:10a6:20b:747::14) by MIWPR08MB119034.eurprd08.prod.outlook.com (2603:10a6:290:91::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.615.14; Mon, 16 Nov 2026 10:32:03 +0000 Received: from AM0PR08MB11804.eurprd08.prod.outlook.com ([fe80::bf46:f137:f6d2:5b3a]) by AM0PR08MB11804.eurprd08.prod.outlook.com ([fe80::bf46:f137:f6d2:5b3a%7]) with mapi id 15.21.0615.013; Mon, 16 Nov 2026 10:32:03 +0000 From: Pavel Tikhomirov Date: Mon, 16 Nov 2026 11:31:49 +0100 Message-Id: <20261116-pr-ptikhomirov-vstor-154129-aio-pseudosuper-ring-v2-1-532d149b4bd7@virtuozzo.com> References: <20261116-pr-ptikhomirov-vstor-154129-aio-pseudosuper-ring-v2-0-532d149b4bd7@virtuozzo.com> In-Reply-To: <20261116-pr-ptikhomirov-vstor-154129-aio-pseudosuper-ring-v2-0-532d149b4bd7@virtuozzo.com> To: Konstantin Khorenko X-Mailer: b4 0.16.0 X-ClientProxiedBy: BE1P281CA0160.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:67::10) To AM0PR08MB11804.eurprd08.prod.outlook.com (2603:10a6:20b:747::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR08MB11804:EE_|MIWPR08MB119034:EE_ X-MS-Office365-Filtering-Correlation-Id: bfa6fa3b-2554-4335-5d89-08df43ccd960 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|23010399003|376014|366016|52116014|10070799003|1800799024|10067099003|56012099006|260925022911599003|260925021911599003|260925021311599003|261026121527099003|261026140227099003|261028144727099003|261021121427099003|261022075727099003|261021123027099003|261022105027099003|261102123227099003|18002099003|22082099003|6133799003; X-Microsoft-Antispam-Message-Info: AUYYGcY0ZDp+rKlBLsaLFxj6btjCOHjoJL/xO0WibxFOtwFhD0BSRr7lFiYji4oydvwCM3aBVnvzXzrilq6gsVfUkjOnxZ4Al/QlgfbDzk/E1CxRznkbAfnIt0w2j41CaKMwhcZvQIlH4w/yNaYvL8e8IQeNrS6M4n3sSCTjkSOvgPm50/jz8q1jopmoT5wANgjRy3aZ6C5X8s+bkpFBPuJrNnNjl6DYEn7Jd+hzyaRsq10kYLAgu0/CHy1ZMPyKVuLO4vqAJcESiIoD8ozJjtoOYsbmw1b6fSi58FtZb+m+Ix4Lw4yGwHQgbeldB/zv0dAnFQ3/ZMj//F27B4JTRiVdfhD93I1h6+Ufer4RNBF4ItF2hUMi6bLcaStDO3DCIBsjCGXNo9jGK49oB09mJtzkb6XL+b6aoeBi/stlWDt4N6GtnyVOGJYTX3U835NP69XJREcbv7K3DwGIYSuYqsa/NDq1cGkKS+9bmm6pVqxVG7YW+lvBGoAoP0cv6EHaKbsFNpW5Rf8TeAbZ6XLPBlicLySUHLgL1iTo3h23yj5rDRqaf2Gnk9aBAYBpzWovdPPDpHtWFJobMQsF7ey6LLxTec1clmpW9PbAdo5xwDkq/ESNjNqT6AwBjbBYgCBk X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB11804.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(23010399003)(376014)(366016)(52116014)(10070799003)(1800799024)(10067099003)(56012099006)(260925022911599003)(260925021911599003)(260925021311599003)(261026121527099003)(261026140227099003)(261028144727099003)(261021121427099003)(261022075727099003)(261021123027099003)(261022105027099003)(261102123227099003)(18002099003)(22082099003)(6133799003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MzUzVWUyM2FjS1IzY2g1VStHbDBOWUVDZGxLcXlFQ3QwYTcwb3VPeS90bEFI?= =?utf-8?B?emd2TDdDZUpkelFLbzhNeUszOFduamovYzBmd3JHaEV6aEtMam5ndEpvejkz?= =?utf-8?B?aG5uMEx6VEhXSVExeHVIUzZxakdjUWppNmM3dzBYRlFHT0FuMGZiOUVWeHBE?= =?utf-8?B?dGNvNnE2Sm5NNDlZVkpXcmNlWlBJRVVDaDJoWjErNkoxVFF4M2UxV3ptNFdm?= =?utf-8?B?SU9DWTN6S1N6eEZXWnNWeUxoc1RVeEp6dHVySHRnY0lGRW5ObWVnRy9wTFo4?= =?utf-8?B?c29mT0x1RW03MVdQVDRmRytOTmVPYkFraHdNdVI2T1llbW13VVg3T2JIbC9q?= =?utf-8?B?b0dNeXdHVG9SelBaai9sTmFhVDZ2QTB2VUV0TUhtWnRKMFRaSU9SbzhFNVJ4?= =?utf-8?B?Z1BS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d2dPbDhT?= =?utf-8?B?V1oyZ1NiVnB4UDMwcXlMbnJmeFJlSkhyc1MzRnNVck9Wb1lEUkZ5ZEVtT1Rr?= =?utf-8?B?V1FzSVFmcE4xSW8vZDBQTHQ5aDZGeThxSktxc3JiUUQrTzN4SjNsRXh0dmxJ?= =?utf-8?Q?J9I2jHOs9niBEMReM3j3615RJuey+bsDIqa5JsphXwU+7?= X-MS-Exchange-AntiSpam-MessageData-1: Rc4aOdxKd7RryA== X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bfa6fa3b-2554-4335-5d89-08df43ccd960 X-MS-Exchange-CrossTenant-AuthSource: AM0PR08MB11804.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2026 10:32:00.9982 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mkld4FOCDzU7D4Tmy26DPSdgemcZNfme5KfEi3YSOOgkZw71wQSya3R8fTssXTEVyyCHCFG1BT49EDoeh7WJbwrSRF7mnW7NyUg6g8x012w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MIWPR08MB119034 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 v2 1/2] fs/aio: restore the AIO ring of the dumped size in a pseudosuper VE 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 io_setup() makes the ring at least 4 events per possible CPU of the node. The ring is mapped into the task memory, and CRIU restores it with io_setup() and moves the new mapping to the address of the old one, so it needs a ring of the same size. On a node with more possible CPUs it gets a bigger ring, and the restore fails. E.g. io_setup(1) makes a ring of one page, 127 events, on 4 CPUs, and of two pages, 255 events, on 16 CPUs. Skip the CPU heuristic while the VE is pseudosuper, which it is almost only for the restore. Keep the other adjustments, the doubling and the rounding up to pages: they don't depend on the node, and the queue depth CRIU estimates from the dumped ring already offsets them, so the restore gets the ring of the dumped size. A ring restored below the minimum of this node doesn't use the per-CPU caches of free slots: it has too few slots to spare for them. https://virtuozzo.atlassian.net/browse/VSTOR-154129 Feature: ve: CRIU support Signed-off-by: Pavel Tikhomirov --- fs/aio.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/fs/aio.c b/fs/aio.c index 901cb622fe2c4..2ff1758507611 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -109,6 +109,7 @@ struct kioctx { * counter at a time: */ unsigned req_batch; + bool no_percpu_reqs; /* * This is what userspace passed to io_setup(), it's not used for * anything but counting against the global max_reqs quota. @@ -745,6 +746,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events) struct mm_struct *mm = current->mm; struct kioctx *ctx; struct ve_struct *ve = get_exec_env(); + bool no_percpu_reqs = false; int err = -ENOMEM; /* @@ -761,8 +763,16 @@ static struct kioctx *ioctx_alloc(unsigned nr_events) * and unavailable, double nr_events so userspace sees what they * expected: additionally, we move req_batch slots to/from percpu * counters at a time, so make sure that isn't 0: + * + * CRIU restores a ring with io_setup() and needs the size it had on + * dump, which can be below the minimum of this node due to the CPU + * heuristic below, so skip the heuristic on restore. Such a ring + * can't spare slots for the percpu counters, so it doesn't use them. */ - nr_events = max(nr_events, num_possible_cpus() * 4); + if (ve_is_super(ve) || !ve->is_pseudosuper) + nr_events = max(nr_events, num_possible_cpus() * 4); + else if (nr_events < num_possible_cpus() * 4) + no_percpu_reqs = true; nr_events *= 2; /* Prevent overflows */ @@ -779,6 +789,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events) return ERR_PTR(-ENOMEM); ctx->max_reqs = max_reqs; + ctx->no_percpu_reqs = no_percpu_reqs; ctx->ve = get_ve(ve); spin_lock_init(&ctx->ctx_lock); @@ -950,6 +961,11 @@ static void put_reqs_available(struct kioctx *ctx, unsigned nr) struct kioctx_cpu *kcpu; unsigned long flags; + if (ctx->no_percpu_reqs) { + atomic_add(nr, &ctx->reqs_available); + return; + } + local_irq_save(flags); kcpu = this_cpu_ptr(ctx->cpu); kcpu->reqs_available += nr; @@ -968,6 +984,9 @@ static bool __get_reqs_available(struct kioctx *ctx) bool ret = false; unsigned long flags; + if (ctx->no_percpu_reqs) + return atomic_dec_if_positive(&ctx->reqs_available) >= 0; + local_irq_save(flags); kcpu = this_cpu_ptr(ctx->cpu); if (!kcpu->reqs_available) { -- 2.56.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel