From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796064415; b=tCjxsupBvqP05YbTHHHWiIr+LUTY032VupTbE+OBy+xXXKqwTctH3twX52gpUiRKmgHV jafDutQ/89wR9HxR/P1BWVrBZEoeSuVVjl4zSBauhuoLS1elh4/ZyVvCpxfdDx0SsXGUw MChs2YbQWPafinRXzWnA3FBUg72JS1GGhCfd0yUxEthJLB5xa76WYNT49tNGfCnEPfvLR I7zXkUzOm+rzWUxnZiqMfEq3DrYCXcxqAfE7HX+/7Y6SMUBQmULtyE2zOpDAe8KiYqjpj 1X71qT3DeT0a6C2UdnzZKPWsvPxGDEzvidkYG1FUWr5SpRxc+8kEVZz4482RHo0+40g== 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=1i3cg6b0v2bs6lyfrqH7rKlssZHlDwUoagMcFxn0NoNvkvvV+EhwSSSqX+pIJ0ZvRTHZ RvNNq8iy2PwAr/gnQoWhQihhBzaSap4+BjHAx0mT5sj7hDZ+KDD9Ut0dmQhJyELoYEwsc EjO91TPP3jOAVZmTSJP4HwRGJp42m5RczFIPwHDmPhGSiajezUEwkZ3PJCp2eWdGSFjRv T6RXK5vElk2/wQhg+X2YgdBVZOjJBLWCNo0a7ZXc9+nprXWkQQy+sUkPyNn0r+m8R9bCG DrgxTlO3QU58QMRkcmTkH4F2grVqC2Psz6HeNlyNBpmegVSo0+HEDup7Mr/xFGURhUg== 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.131 Received: from mail-yx2-f3.google.com (mail-yx2-f3.google.com [74.125.224.131]) (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 42B77606A320 for ; Mon, 30 Nov 2026 18:46:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 42B77606A320 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-f3.google.com with SMTP id 00721157ae682-8a72cead747so21947727b3.0 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=j+FKzGqGxFyvQfuC/4/UDoWnXHkVxjDwHsX/2KI9D5Boq86A0NBmY4XVLnSHF/rena wxpnOIzGRVmzN2BylnTj1RyNYGnMkF3QH1XHveWNO5l8hj/vPuFKq+O/Xb210kGw2Apd nxXQRKzb8wkVyFtQI6ROhkiqccvKNmFm9NSnY/Cfglb1YDWLyw9mkXXRqCXCIXHn4GrU 4Ut8h7dYziEByKTbk2ciazppJ2bl/3gxNSTI2SaZtCgTTWIbXU43V6AOiKjgU689ymqu S6Ej4aZVO6Zd6b0WpT2wCLTY6FfymWsnlxNn8BmsIPGaBvaY00SeL1tRjRO4FAb0AZX/ kfCA== X-Forwarded-Encrypted: i=1; AL+hErE2e5QsgOG+w5ntspwQL6H+qZh3p7RsuI7NaR2fSMj3Y9G/jZ8Bz9qnV4dAFpdTntmwq/cGX7OHnq4=@vger.kernel.org X-Gm-Message-State: APuU4Z8mjybjiMw700bUzbLP4ZQYX6RBqjs5ZDN1UrLQhmdI3QPtg+gX wsa33v5hYzbR3/2S4C0ti3kQrKwNGaZTXiCblmDV7VpdguPnRUdxpfs= X-Gm-Gg: AZFdTZeKzTqvTTtZxj5VrIsVMaYLHQI7h+F+u3n0EEwA9BzKqWWDXB4mJQU31Nkydks YEvAiRmD255MY1ukQq5e4fJ1Vdr7cjk/Na7Gs77z4fb4xJitNaMRxiagx+HKhmFLj8WYrj6WZgg ZVIqxe36v4s0y7o5qCGRzDICE10x3qYU3+rSJNCC1KC8ooc6tQRXkSIHxNroHOn9EASRJW/GrCx eZQ17DhI6s0OTNUcXfmlTG27nPjnWj/qsaRmxv47jdcW7QLdR2B9FkM3PUtpMc3GRncFTmdWkCW HE0R/2NCGZ4Zr5a13ZhFnXl0wLM9bvay0Mt0MTNeJqMsCrreZOV4+Il4+adW6U6FnGBQfFHIGJS lqO/91hFPpP3U8hdAHZAMfznbG5FWr8hw6q9rIXHx0OxyvHXgPOVn60BoscE29tvArOK8C7De5Z pZ/mGC5/KDx8vQx7hyV2MY+zYZT1HhbsKmLevdf3PFfQEdvLha8Px/dTlTuAy9zyJWCA241fEKG 6uqEfcjxDj+s+aIkpIhT509tr870TR/J4Wbf3PfBMCaomQbmnOC5PB0erNpoyZ3TlJ/lTtTbph8 ZhEs6bnrsVKP8k19s30qZ4yPwBqeG8CnjWX4KMWn1AU7V2h4LE3Uot5ank3/1Fhdk+pvybU= 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-pci@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/