From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 88DF58017D for ; Mon, 21 Sep 2026 20:54:29 +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 68LKr9hc010893; Mon, 21 Sep 2026 23:53:10 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68LKr9hc010893 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="S1ZU8Uyt" Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68LKr6MR010889 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 21 Sep 2026 23:53:08 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68LKr6MR010889 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-892be308859so47547787b3.1 for ; Mon, 21 Sep 2026 13:53:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AKwUvBzBM+XpBlsdcuZlXReSTL4o7wi2S7iWPC4eCSMboFuSPZq6xnXz2UdK/sv2IazzU+MQW5r7VA==@openvz.org X-Gm-Message-State: AFuF++kqbJ3Lf1hNYnCPAiClzNhiSCrDG5eD0+I6b7tNbyLCQkQ3D23C qnyIepmLrM/2zTmWKFV/Y8pSbDir27zAEUlu4NGHtyi0Uf7lwnaT39kQWZ4olpm3cgLo+FlSDuk MeVMfbZ7jmgcEipW7otkQ96g4DzxaDqLDJcnEPwXRqKdJImqOZ5k+UA== X-Gm-Gg: AYBFou2rh8F6oo2D/Awjy95rmXR9pc/OQ4mBVkXIW7uKh6TVrpqgC/rnfkJxc2UjQtq K5jgbObRaO64Xf7Z+Zd/BVc70qXWl2lUghEd4LGyAC+qNYet2XPMAh9uI7FgzDlchDLvMnI7cmx vwLPgDyJHSKyCOZ9jbQ++UieoFiLyEAQsmSEVctzl6JGXO6vEK7WAzN2TMbynPePIVn2KavzSNS kZbLhBDdP+AHMsubNbxcFKQQHpRQ8e39CaD20ZrB+LhE0v/XVR5+dfHPJJuY1KvZ8lnoE5bzg1E SAYD/l5pz3UVUqcR+lfDOZdKN8wovqZ/AZ1q9iwLm6hXMb5G52UG7YMsGjVMF8dXl5BA+AOBAkC +1XtF4LCidPofTa7duoozWVgWkYGATZAI/tmbD5/wCwqJPXwsMi8eGG/YF56Md1zb88m7RrsNA7 fsB34HcY7rT4cfkSJ7E/kqtsUxiEx3WRhcmmKV X-Received: by 2002:a05:690c:f13:b0:89a:63bc:8c3 with SMTP id 00721157ae682-89a63bc0b51mr25996867b3.77.1790023986422; Mon, 21 Sep 2026 13:53:06 -0700 (PDT) X-Received: by 2002:a05:690c:f13:b0:89a:63bc:8c3 with SMTP id 00721157ae682-89a63bc0b51mr25996797b3.77.1790023985813; Mon, 21 Sep 2026 13:53:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1790023985; cv=pass; d=google.com; s=arc-20260327; b=aZ56FwnSiFs05r+HNHmYowrzjA9+e83i/hIkAImHrtyYnQvTC5HsOv0yAD+CDJm/KP hT2F4ohwa1wfSbzYuJ9WyQ+RA4SjgBU2xfl6+VvSe6xQS2GXe7MXUhV6LL7ufB8l1KJG 5dZ8B/jQuXB2eFpRPpfaA9Aa57k2VZ3+thAfYl8GiTb8CbVgB2RY7sYg9bSm0jU0UHux NRIc/oQ0GmFKojbdqAcGyCw8KG3osso1cTVvyH/a5sP8dm6ctlkx1SGMCNA2l1cJPiGs cXH141qJffbtfRc+eXYA5XqC0Uk6qGgllFFUcBMPV0GyfJBFOF5qksWV9U+WTGHdjtwP kp0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=mime-version:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:date :message-id:dkim-signature; bh=pPda7ADIp6D1IaFY8zR87TSpbwpeyZGhDHFovaEwn9A=; fh=0GSfznpxdY8uejsEOnzZHjR7lLnMbCOWzcEzVq+EHuc=; b=Q/G5an1ubTA9TWps6eanPtaO+Z2SG8Npb/eDLnNQmK0FK7SUzRSH20uy3kQi60Egwq VfDfFX3h4ZBDv1cgJ755qnylGsSYssq5n5MpwcngfimJBBkD/gpFWS2ZI8ojjBjEHdHe j/MR+Fh/JLKFrxZMI8ywEk0RsFnQcrMu9fcEkkirr38tsM4DKBLfUerYV5Qc3m0x85Ro BkG5dDOrslKSQ4+M2B83t9XadWHW/y2c9eL2xa0vXOuWOx0xbEuGDGQ3u7rQipSTelDt fWC4SSqGtjxptsO3exgzEXBayDuaMW/duJAsj6noLiwetd5PFwhr2/8wkIJXkPZdVtgv C2ng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=S1ZU8Uyt; 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 vladimir.riabchun@virtuozzo.com designates 2a01:111:f403:c200::1 as permitted sender) smtp.mailfrom=vladimir.riabchun@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazlp170100001.outbound.protection.outlook.com. [2a01:111:f403:c200::1]) by mx.google.com with ESMTPS id 00721157ae682-8a23f336473si1399767b3.30.2026.09.21.13.53.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 13:53:05 -0700 (PDT) Received-SPF: pass (google.com: domain of vladimir.riabchun@virtuozzo.com designates 2a01:111:f403:c200::1 as permitted sender) client-ip=2a01:111:f403:c200::1; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector2 header.b=S1ZU8Uyt; 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 vladimir.riabchun@virtuozzo.com designates 2a01:111:f403:c200::1 as permitted sender) smtp.mailfrom=vladimir.riabchun@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=kc6QoXm3DHEs/2UnDHJGeekwiRqI0rXC1RSeSGPjnDcZW4B6bUi1Mq3GSIHX1d11ES5UQEyaDgNCmPislWhbDNagoIg95Ysb6U57WK5Eyq32nS4s96YTGOGZ97sAQh4l9Aqg+PUG8rPzykxVnQ6wE4F7ZzKtLjf40vZyL6vC0AkB714A2RtL9OZ3VDOvJlsuOlPAOcf9X6uCEDMTUuBlQQqhW2o01N62QhgM+yeQfrodbYX/K77sCdUqRYY0QQdUX0QOHJd1mgounS58Hd/O/bCGZnctr2v1G4BtKPEZHNiGKYo/XKQGJxOuwsSkqrPq5sx2AfSla4rMpNIhLB6uJA== 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=pPda7ADIp6D1IaFY8zR87TSpbwpeyZGhDHFovaEwn9A=; b=CC7KSnRLrM3+c148fuOx0DU90EZa1fxWKacb+ioKms2p1AjkMLRqg6pexfmLBsd4ixee3nnId+RqDcXWaYMJwB5jtA5zO2oK6R2kdEXye+ToyRdORLnF5iYCJFFsUXKNKmwFInMKTbbFUPrMw/ClJyZTNKQNnIrCYbHeRDLyp5jUcPlnDT5Bw86UMXR+WnJg9VVM1oaQZQnYYY1o3CSHFI/NtmODhO5e1Kf3a45pxV4m0RTtNf9HNOhULdOnTXYBF5gWj6aGHxRQ50aHdZO7KtUcCIYUWGYobxjRmpuN6z3jXCKO0ZUcOjhQbOsB14864diX7uDc841Nck9AhJUA8Q== 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=pPda7ADIp6D1IaFY8zR87TSpbwpeyZGhDHFovaEwn9A=; b=S1ZU8UytBjUlY77Urdq8AqEWmFvFUgSLNabnry/si2d3UqD/B+ORkH/INoHQMvub0oOw5YL7ViOs9ZsFiA7K/vmmtASMoQMBw1WRtI4oxVgqj19ReVyXml8uJ7ikYZ5CDhTPK9bb3yjMkbA1hfbTH8dsHXGQ1MFmUOUxJJk5pgo0plv3R5HJq1DPb61PpMjBM9Q32RzEOX6LvzbJx5+cZg5UQZ/BUAodPUSMaZSnj2eb3z+JQOdA2LTvJDQA/w2RAFw+qKim2pgtdzdSn1XgXBz0sK54w56WSJAtC6NQR2poliBpSmzfZBIrhi85YXlQS391gZK5QnrafwlFIvvF2g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=virtuozzo.com; Received: from DU0PR08MB8470.eurprd08.prod.outlook.com (2603:10a6:10:406::17) by DB9PR08MB8314.eurprd08.prod.outlook.com (2603:10a6:10:3de::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.451.13; Mon, 21 Sep 2026 20:52:52 +0000 Received: from DU0PR08MB8470.eurprd08.prod.outlook.com ([fe80::3db0:9d70:4641:5f47]) by DU0PR08MB8470.eurprd08.prod.outlook.com ([fe80::3db0:9d70:4641:5f47%4]) with mapi id 15.21.0451.012; Mon, 21 Sep 2026 20:52:51 +0000 Message-ID: Date: Mon, 21 Sep 2026 22:52:49 +0200 User-Agent: Mozilla Thunderbird To: Liu Kui References: <20260921-acssp872-batch-connect-v1-1-ded37d934f28@virtuozzo.com> Content-Language: en-US From: Vladimir Riabchun In-Reply-To: <20260921-acssp872-batch-connect-v1-1-ded37d934f28@virtuozzo.com> X-ClientProxiedBy: VI1PR0202CA0016.eurprd02.prod.outlook.com (2603:10a6:803:14::29) To DU0PR08MB8470.eurprd08.prod.outlook.com (2603:10a6:10:406::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB8470:EE_|DB9PR08MB8314:EE_ X-MS-Office365-Filtering-Correlation-Id: 2887d7b4-dca9-4cd0-4ac7-08df18224ce4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|23010399003|366016|1800799024|376014|6133799003|10067099003|5023799004|56012099006|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: bCS+K8+7OUiY8By53wg+8oo7h79dKwPQ0AGTqM75yzLxtviLO1rCOlN1s0MytFOzMZbCsWK5FJ2iLwiJz+nut92TV0wD6MdU60kBFZ/lhn0brZB7qWf9G+PgqZqvC6az5ukqojR7yol7r89m9B0q0EYhLuGNxKTl2YA2JQ8b/FhvLMODyyJGbrwg/emaHOiXZso3uBWoqgDJIo0Ye7kvu/CPOQhYk1Ou8u+BngHs/1osXy9A0tVqP6+MpFv8/nl/3eBfBi9KqhBP5uh/VdKBCzjwVS+iuRlwJdirGYAOI7ua4RZTydYj6Ug5Q6SwUjIsMME+sKQ0PAhoXIO+dh7eJPUxZYlW0wzdJpgR6R6xGhFX2t189P+hZC32BN7P/QcAobnXRb4QX+qqVFVDqorWaeHP8whU6Vv0UpfaUWDM6HzVzC6qhPVQTGD56xb0QS9yYnFY7nXz1tGBAcUPX8u/4pXpq+miT+7Us2wsYT+OXuJT+wYopRv9w57dY55DxSN6yCzyfmTtg3Wo66KpqC7Lx2nnMVwp4A+gqg0GNBquvOE/eZdw1DbO3KyLLMT7LSet/q2J6HcQxQcl+/ZuJDDZIMplPeOizNmqmx19h5sXod4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR08MB8470.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(23010399003)(366016)(1800799024)(376014)(6133799003)(10067099003)(5023799004)(56012099006)(18002099003)(22082099003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c3Q5ZVdxQVkzdlBFZHQ3QnRUSmtFcTUrVlNjM3pwNFRXbERBbHpXOS9KN3Az?= =?utf-8?B?N0NsL0hFTGVLa2JyZTg4OTJTSk1qZjhYaG1QZUI4OWhxdDl0NlZsV3U4Q3E2?= =?utf-8?B?SFVFSmxDU2YyWmVoQkgxYnFJelpZZC9JVGhvcGJTSnFac2w4MEhraWtWMGdi?= =?utf-8?B?R3NQeUJKRHhFUFpCY2RIUFYrU2JYMTM0MzZQNFZBWndiVmttL0hCSmpnZXg3?= =?utf-8?B?UDBHMlZ2WDFFYmludEJRbm9YOU0wWXhIazF0MzlzN05XbExuMjZoVTJUeUZv?= =?utf-8?B?TVl5ZzV2QVdUaDRpSTJvQk4xekw4QVFiMmczVFMxYzZDZDlnL04zL0FIa2FP?= =?utf-8?B?SGdYakhuNUpRV1FKL21VUTJPMWo2cFNUTkhERE90VjlmTDF5TjZHajJsQkhJ?= =?utf-8?B?b0xIMndpNXdmazN4bXBSNDZFY3l1ZWo2M2c3Y3hHa2k4NklZbzRLUmdOZTVQ?= =?utf-8?B?b3R1WmtVZFhodS85VHhIVzVRNjdBR0dlSC8yODdGWVk3VStUSWJzTFRhV1BH?= =?utf-8?B?MGVMaXNlRmdoNmk5S3VxUTlSYlR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-8?Q?eglXlfVlEg8b2r6k=3D?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2887d7b4-dca9-4cd0-4ac7-08df18224ce4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB8470.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2026 20:52:50.9162 (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: DQ3AQfbtBgwH5WOup6XyHyPySk4nIPcPt4bTqPaaJhGD7H6KfKi0B8XXqeOVEnSOsVJDtkWXmeOUsYMf0D3xJ1amtcCiMUWdbaxLMCJ6PmM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8314 X-OZ-Fwd: true Cc: devel@openvz.org, azaitsev@virtuozzo.com Subject: Re: [Devel] [PATCH hci-8.1] fs/fuse kio: start connect once per rpc_queue_work batch 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org On 9/21/26 13:28, Liu Kui wrote: > pcs_rpc_connect() is synchronous: it performs a full connect+auth > cycle while holding ep->mutex. rpc_queue_work() splices the entire > ep->input_queue onto an on-stack list and used to trigger the connect > from pcs_rpc_send() on the first staged message. When the connect > fails, pcs_rpc_reset() purges ep->input_queue and ep->state_queue, > but the messages still sitting on the on-stack list are invisible to > the purge - each of them re-triggers another blocking connect attempt > under the same mutex hold. With a large backlog and an unreachable > peer this keeps ep->mutex held for O(messages * connect timeout): > in one crashdump the rescuer of pcs_wq ground through such a batch > for days, starving calendar_work/rpc_close_work on the same ep and > wedging umount in flush_workqueue(pcs_wq). > > Stage all messages from the batch on ep->state_queue first and start > the connect once afterwards. A failed connect now aborts the whole > batch in a single rpc_abort(), bounding the mutex hold to one connect > attempt. This also restores the meaning of state_queue, which > otherwise never held more than one message. > > https://virtuozzo.atlassian.net/browse/VSTOR-135626 > > Signed-off-by: Liu Kui > --- > Fix a pathological case seen in ACSSP-872 (and ASUP-3562) crashdumps: > a single rpc_queue_work() invocation could hold ep->mutex for days, > re-running a blocking connect+auth once per queued message to an > unreachable peer, wedging the pcs_wq rescuer, calendar/close works > and umount in flush_workqueue(). > > https://virtuozzo.atlassian.net/browse/ACSSP-872 > --- > fs/fuse/kio/pcs/pcs_rpc.c | 18 +++++++++++++++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git a/fs/fuse/kio/pcs/pcs_rpc.c b/fs/fuse/kio/pcs/pcs_rpc.c > index 540225006726..c50e31c08a31 100644 > --- a/fs/fuse/kio/pcs/pcs_rpc.c > +++ b/fs/fuse/kio/pcs/pcs_rpc.c > @@ -702,9 +702,6 @@ static void pcs_rpc_send(struct pcs_rpc * ep, struct pcs_msg * msg, bool requeue > > list_add_tail(&msg->list, &ep->state_queue); > msg->stage = PCS_MSG_STAGE_UNSENT; > - > - if (ep->state == PCS_RPC_UNCONN) > - pcs_rpc_connect(ep); > } > > void pcs_rpc_kick_queue(struct pcs_rpc * ep) > @@ -930,6 +927,21 @@ static void rpc_queue_work(struct work_struct *w) > list_del_init(&msg->list); > pcs_rpc_send(ep, msg, 0); > } > + > + /* pcs_rpc_connect() is synchronous: it can block for a full > + * connect+auth cycle while holding ep->mutex. Start it once, after > + * every message from input_q has been staged on ep->state_queue, > + * instead of from pcs_rpc_send() on the first message. This way a > + * failed connect aborts the whole batch at once: rpc_abort() purges > + * ep->state_queue, whereas messages still sitting on the on-stack > + * input_q are invisible to the purge and would each trigger another > + * blocking connect attempt under the same mutex hold. It also > + * restores the meaning of state_queue, which otherwise never holds > + * more than one message. > + */ > + if (ep->state == PCS_RPC_UNCONN && !list_empty(&ep->state_queue)) > + pcs_rpc_connect(ep); > + Now I seem to get the problem we are fixing. This will work fine when no problems pre-existed, but if the thread already collected a bunch of messages in its private list, it will prevent live patching. Ref: https://docs.kernel.org/livepatch/livepatch.html#consistency-model rpc_queue_work task has patched function on its stack (itself), so approach 1 is not for us. We can't poke kernel thread task with any signals and waking it up in klp_send_signals will not help as well. The doc I referenced above describes /sys/kernel/livepatch//force mechanism, that can force patch transition for all tasks. We may make use of it to fixup the thread. I checked disassembly and pcs_rpc_send is _not_ inlined in rpc_queue_work, so after forcing livepatch, new versions of pcs_rpc_send will be executed. However, rpc_queue_work will be old one - jump to new function version happens in ftrace header, we missed it and never come there for a running kthread. So with this forced scenario we can clear local input_q list, but nothing here (I don't know about other places) will then call pcs_rpc_connect and flush ep->state_queue. After moving all input_q to ep->state_queue, without pcs_rpc_connect this state_queue will move to local state_q, which will then do patched pcs_rpc_send with requeue = 1, again without pcs_rpc_connect, and put these messages back to ep->state_queue. My question is: Will anything blow up in this case if we just move these messages from one queue to another without calling connect? For me it seems that it will be a fast journey, all messages will go to ep->state_queue and we will leave the kthread (repeat = 0). Am I right and just forcing livepatch will work, or we need something smarter to fix stuck threads? > list_splice_tail_init(&ep->state_queue, &state_q); > while (!list_empty(&state_q)) { > struct pcs_msg * msg = list_first_entry(&state_q, struct pcs_msg, list); > > --- > base-commit: 3851feefb321d7dee9e57cbe7926410aa6dd043f > change-id: 20260921-acssp872-batch-connect-bec05e9db04d > > Best regards, > -- > Liu Kui > > _______________________________________________ > Devel mailing list > Devel@openvz.org > https://lists.openvz.org/mailman/listinfo/devel -- Best regards, Riabchun Vladimir Linux Kernel Developer, Virtuozzo _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel