From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.136 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796064415; b=PXuvucFb52B2TuGxyqQHwWejwNGY3ywJlpUlhGMj0RHmh1mwHV4/SI1P5syMWtagr58/ oPe3m9kG0p2TzLAYMycObnNRYCJ5QULiezBkOH7wmsxHIQmNdEtFoL2jd90ieQc9Mfrs6 6wNd37dQZ7YclwrR6htLWLZr5vDCR47IiTLlGRSTNc25OoP/+FFChoTFEVeiw1CdhtGU/ bQlrhnmrJKA92DWqCzSvve3c8E2NPa6ne21GTBMIcGvL9HciTdFT+GauYazzYusP/152t IU3rIQP0hZNhgatnesPMbgYA+89wQp1czwadncjJUcUP+9bgOO5k6QC68c0/23Cj6MQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796064415; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=GAV0QPqZNO7B7T8xJAE2bYUlh8vl25bcN6jLifU/u1o=; b=Pp/bRkjHIjYoTZ9odOoZB1t55wHKJXjcKSIy5fKSeMdt6c6ZJwvkN5HcmiHpwI5sye9Z STIl6zi0KWKzS2I6TQmgJdtUtcYJXl/M97SGE5cmpNe4KGqhuFUC1aHEOsi3ajs5gANGB ogdZyA9hT//gACB20+A9xso7hd8uH+DGvtdw3ffhiqVkmmW2KR0pS7vU9WFPbyiNzsWIO JJDdVPgNjoFADTgl0wMpG6vRnG049nosC8nGFcqc3qENb/OP8nHKEgynrpCcifFGFPI4X iKDSnK0Xb/xnx3jgQC9nFYcedRHIqXNd0+ETknJQmXIOe9eHA/S7ddeGTZrzUkFROyg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=VPt3nu8m; arc=none smtp.remote-ip=74.125.224.136 Received: from mail-yx2-f8.google.com (mail-yx2-f8.google.com [74.125.224.136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C078606A325 for ; Mon, 30 Nov 2026 18:46:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4C078606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=VPt3nu8m Received: by mail-yx2-f8.google.com with SMTP id 00721157ae682-8b35e6f613dso24341937b3.1 for ; Mon, 30 Nov 2026 10:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796064414; x=1796669214; darn=vger.kernel.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=GAV0QPqZNO7B7T8xJAE2bYUlh8vl25bcN6jLifU/u1o=; b=VPt3nu8mqi4/7XTCa5SEWeDyWQXFq8Js9fADN2sRtBYpMXncy7yKhSM5r0eTdsHZCY Hs0bVAu69vg6jX3R/tGo2b6aNR59nPav2zTjMwjXKjjQZV628QmpsqkYvtzG7dAtlqIm 3dTZ4QAHt+K/78KhGnk5Yq3II4WbouSQ99xlv94uR07pL1NPhNIJmysoaCZf2Tt68MMo +7v4H+Bkzx0CTlgCoqMQnyhnK4by/Nzjz0IlH+aDEuiMHlprY3+Ol3Z6zhE+f5Ehm/Wi OLQt9PAlESlSkkOf8/8I+8u9TQ4QLBS9zx7JVq1cBHbPonYLX8f2bmaWW+WaKW2yUt8Y nBRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796064414; x=1796669214; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=GAV0QPqZNO7B7T8xJAE2bYUlh8vl25bcN6jLifU/u1o=; b=fnwT5fBAWGY8RWfSDeRT8AzeoOFj3Ljsrel5GkOiW4GtpDevvr66yPcszce27a/feo nasFalQuNuwhoSAKtgOwcfQqKmCRYroioOLrlIxWyczChXyS1akZO3QY8vOQJmpntI7V udWFRJNptA5vYuyXNPDXhH3mPqqoaA4GPEMR90dWCa05mcDplVlArZUnkht6mpODD9Ty nbSI3mllq8gHQt06IamWt0yhFrsYGbhljtZaqoC+dr++XUIaoILNQxvWijU18gwupFff mQjzgap7AsqrQ+Ho2vGh2/9I1LrjD3CVp1XHixYf2l50TiYML9ICw1jLIZb3/L5/Jdmc tYHg== X-Forwarded-Encrypted: i=1; AL+hErG2IHJ6G/AtC0VBHg3iBPrVn4FvH7qooI8j2Doo4/EIhdabzYtbBQN75TsrydB8KGhl5tueY/IYkqL4DrA=@vger.kernel.org X-Gm-Message-State: APuU4Z9BKEzWubdKb0VOO1rC1r5OidbScumN8Fo/6rbrWcFlbCZE59rx 4Ej62DX7UTEUE39u6eD5rVKXjLnfgqLTjd3hGDBe/FVMPl5wgd73Ar0= X-Gm-Gg: AZFdTZcKjoNpcIESTMgYsvi1u7acEh6gsW7teUKkCAJM5XoGKyzo6lwOC2NoilR9o6H s+VetrBUl9kjjMnIayhd4Z+AYI935SjKFswnChkpyQNMwF1N5chpypIm7kYFYBjwlx5VPk8QxrM Edm/BenadNKUJl0rZptqQhE7cdTWkU7hlXV5PypjQ9FstYoRJRKwrf18PDmUelry9ur116bm3E/ e2rQJ2TwMVqHt1gYcDCvOyV5YzU7OTXsq1HNnvqUxDEf55+BSjpo/jvkyPh/cyhzrHv5hY0lZUd Zd2GwuD3lCGTiAHmN3xkAKLy/bzSL8bAbCrrDbsFSYpBFueDZVL5ZGG9HONNG9BIS/J99S7zMdv FsA6L1KceInP8AbxfUtdO5o5Cs/X0hTpnW2uylzvO+mbYOTr0lyor0QriLxhOEFi0a6PRIj7D4r +EML5dzT+6aLXSVHUbcga4mGFy2vgB3Z9hXdU76HyhM29U7LT6peounQHNSoJ97TBbd0Q8HN35b 47LSCMLrIeqC2XgjaIo3xqWgJfzHtR7RwnzorYzikmaZMjSDrYxAOx29ARnTPZdrf4MKPMuYhQc dbdR8eEI3y0I5YtEtmwz26MnojaxAbeoebHKD7W8n3XTkm/NBC/Qf4amSjpWxFPMofUfdH8= X-Received: by 2002:a05:690c:442:b0:8b5:9429:f0cb with SMTP id 00721157ae682-8b59429f35cmr48839587b3.11.1796064414099; Mon, 30 Nov 2026 10:46:54 -0800 (PST) Received: from localhost.localdomain ([2600:1700:4577:1050:df8:9709:d11b:8e64]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8b5202c089dsm131627437b3.22.2026.11.30.10.46.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Nov 2026 10:46:53 -0800 (PST) From: Ravi Jonnalagadda To: Nathan Lynch Cc: Vinod Koul , Frank Li , Bjorn Helgaas , David Rientjes , John.Kariuki@amd.com, Jonathan Cameron , Kinsey Ho , Mario Limonciello , PradeepVineshReddy.Kodamati@amd.com, Shivank Garg , Stephen Bates , Tycho Andersen , Wei Huang , Wei Xu , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v4 25/25] dmaengine: sdxi: Add DMA engine provider Date: Mon, 30 Nov 2026 10:46:51 -0800 Message-ID: <20261130184651.82196-1-ravis.opensrc@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261103-sdxi-base-v4-25-3668ccc7aab8@amd.com> References: <20261103-sdxi-base-v4-0-3668ccc7aab8@amd.com> <20261103-sdxi-base-v4-25-3668ccc7aab8@amd.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Tue, 03 Nov 2026 20:50:06 -0600, Nathan Lynch wrote: > [...] The wait is uninterruptible and bounded > to ten seconds. On timeout, suppress remaining callbacks [...] Hi Nathan, Following my Tested-by on the cover [1], this is what a faulting copy does to the provider on the same system. In short, one bad descriptor costs more than the one copy: 1. The faulting channel stays dead, and releasing it takes 10 s. 2. Under load, a fault can stop the whole function, and every channel then waits 10 s before it fails. In both cases the error log sees the fault at once, but the dmaengine channels do not act on it. 1. A faulting copy on one channel --------------------------------- What I saw, with a 2 MiB copy to (or from) an unmapped IOVA: - tx_status reports DMA_ERROR within 0.2 ms, but the callback never runs. - The channel stays dead: a valid copy issued after dmaengine_terminate_sync() has still not completed 5 s later. - Releasing the channel takes 10 s ("timed out waiting for DMA channel 0 to drain"). A new channel works at once. - With a half-mapped destination, nearly all of the mapped half is written; with a bad source, nothing is. Where it comes from: - The context stops at the faulting descriptor, so the fenced interrupt descriptor that ends the batch never runs, and nothing completes the transactions behind the fault. - Synchronize then polls for an idle channel until its ten seconds are up. sashiko predicted this from the code on this patch ("context stop-on-error prevents IRQ reaping and stalls sync"). - The error log does see the fault. Wei's series [3] adds userspace control on top of v4, and with its first 13 patches applied (09/44 handles the hardware error log), each fault logs a descriptor buffer error about 0.1 ms after it. The channel still behaves as above, since 13/44 kills only user contexts on fatal errors. Question: could the provider complete the pending transactions with DMA_TRANS_ABORTED once the context has stopped, from the error log or from the context status, so that synchronize returns at once? 2. A fault that stops the whole function under load --------------------------------------------------- What I saw, with four processes migrating THPs between DRAM and CXL through dcbm from Shivank's offload series [2], 16 channels, and one copy per run sent to an unmapped IOVA: - Usually only the faulting context stops, as in 1. - Sometimes the whole function goes to GSV_ERROR: the admin context and all client contexts stop, while software has only rung doorbells. - After that no descriptor completes. Every synchronize waits 10 s, every channel release WARNs and fails, and new channels fail to start. Unbind and rebind of the function recovers it. - With one copy in flight per channel, only the faulting context stops. - With Wei's 1-13 [3] applied, the error log reports the function error within 2 ms of the fault, and 13/44 prints "function stopped after hardware error". The DMA channels still wait out 10 s each. Question: is a bad address in one descriptor expected to stop the whole function? Either way, could the provider act on the function failure that 13/44 detects, so that clients get an error at once instead of after 10 s per channel? Thanks, Ravi [1] https://lore.kernel.org/all/20261130182942.82006-1-ravis.opensrc@gmail.com/ [2] https://lore.kernel.org/all/20261128224616.66122-1-ravis.opensrc@gmail.com/ [3] https://lore.kernel.org/all/20261119202321.1734355-1-wei.huang2@amd.com/