From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796134772; b=aWRgs0eVlg5Cf35T87DaW8z6tWBPVepWZB4tZ6D8uKkPIX0gPgmkLFt47IMNQse0We5c rU+cGXwQhbjqObRCuyrxYY8KXazZPoSMNh6T1YYMrJ0YlK5rzLbDfSimRwXP+lo2gNgF8 TA01I4GGCXz+MFrDarVRTx1yoBgTiwDVuz1lkqHUeLuG9iwC4ax5v9xZ3EWTiH9MStt0O 0T9WST7Sg7gGlGRAIj5Fg/5nFboLkxF88jSSizh7a2K7iPJxmui8plkZtA9V6oCSqs4s4 /Qgr70gn5nDlEXsVNa0CQr9Hd7cz8sjAmGOm7WepO827yzmfmDRdmrNbyU914y2Gs8g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796134772; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=or2Zi54xW9aYwItCvkbxLcOE6cdIiBgVCumTQWS3XgU=; b=a8wWGLVdaRZtwPfO4Rva6QndUaWwXkQepQt8/kFXFHhtrJtLUMrlRtxzbnJ6a/Wk0N9r SZ6x32e33hC+cILq3JTdSjhnPlS9KdC7S7Lw9+PaK3YXdmxK22uM4cU8erSbFNVw1eF6w lQ9apT9FRW7dEiO/kv5JhRxxPF0bVYkc5np/jXt+L8haPflLbWAfg0AfEWMgPmkqjf/AJ H+/G3WAHDu97g7gyaoYi69BpbElMv2efdDFsGuA+nsP7cqsKdy4uviqmL9hvbd1w8Oh0c 3syZnR76ILWQIJPEg00PDysa3+tqzsLuwuVC6BBw43rCc1mptYuKo7U4FUxfXl/XJYg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GiifHmG9; arc=none smtp.remote-ip=198.175.65.18 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 917D1606A33E; Tue, 1 Dec 2026 14:19:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 917D1606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GiifHmG9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796134772; x=1827670772; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=or2Zi54xW9aYwItCvkbxLcOE6cdIiBgVCumTQWS3XgU=; b=GiifHmG9NV2lXSQXCZL/gMR9ZWRgTzVToVB0XC6X2yJBpPJ22GIFBp+O fOtjXjTxULcwgRdzT4tJIgbROLvjkRMm1l4Hzcw1eFstY80v6cEUVpo37 SZ3p29AIU7C5aK1J9UQvd/kQTpILItUzXuMrqIplqz8w713jfuLa/ZGDH p1kAJ8WvPWKRYKxb72vY3YbYviB2kdckVtuZWcpzkgJcEk1iQ1PZ2uR6s vxG8zEUbDle5cjNnBErhlGO9bmOTVDVBdD+f8KB+gyTKcwwe0jN3MZAG5 3Fcl8ELeKwty1X0RxD86YUFrY5As28fifTUAxlugBKEvAEqqa2HKU6e4i A==; X-CSE-ConnectionGUID: GURxF3yBQC6zE1shEnb4zA== X-CSE-MsgGUID: RtES/tkbQMCVa4JWr3Dvlw== X-IronPort-AV: E=McAfee;i="6800,10657,11983"; a="5019335" X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="5019335" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 06:19:27 -0800 X-CSE-ConnectionGUID: 6nllzXUPTkWl7s72wjqtbg== X-CSE-MsgGUID: oZNxkylrRCyyOxr+LIZFsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="13380777" Received: from jf5300-15a101203tc.jf.intel.com (HELO meta-crater2c.jf.intel.com) ([10.54.113.49]) by fmviesa005.fm.intel.com with ESMTP; 01 Dec 2026 06:19:24 -0800 From: Daniel Byrne To: Shivank Garg , Ravi Jonnalagadda Cc: Andrew Morton , David Hildenbrand , Zi Yan , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , Ying Huang , Alistair Popple , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Karim Manaouil , Frank van der Linden , Teja Vojjala , Pravin Tamkhane , Kinsey Ho , Wei Xu , Matthew Wilcox , Davidlohr Bueso , Vinod Koul , Bharata B Rao , SeongJae Park , David Rientjes , Xuezheng Chu , Yiannis Nikolakopoulos , Dave Hansen , Johannes Weiner , John Hubbard , Peter Xu , Rik van Riel , Shakeel Butt , Tejun Heo , Fan Ni , Jonathan Cameron , "Aneesh Kumar K.V" , Nathan Lynch , Frank Li , Dan Williams , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Day , dmaengine@vger.kernel.org, Vinicius Costa Gomes , Frank Li , Dave Jiang , Daniel Byrne Subject: [RFC PATCH 09/10] dmaengine: add DMA_PREP_CACHE_CONTROL Date: Tue, 1 Dec 2026 06:12:58 -0800 Message-ID: <20261201141259.2124188-10-daniel1.byrne@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261201141259.2124188-1-daniel1.byrne@intel.com> References: <20261201141259.2124188-1-daniel1.byrne@intel.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 Let clients request the provider's cache-control hint per descriptor. On DSA, IDXD_OP_FLAG_CC steers the copied data toward the LLC on write. This helps a consumer that reads the data immediately and hurts one that does not. Since the right setting is workload dependent, we expose it as a prep flag instead of hard-coding it in the driver. The flag is advisory, and no provider acts on it yet. The idxd side, which maps it to IDXD_OP_FLAG_CC on MEMMOVE descriptors, needs idxd changes that are not posted yet. Signed-off-by: Daniel Byrne --- No provider acts on the flag in this series. include/linux/dmaengine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 5df4bfc000a6..0b9235bd493a 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -201,6 +201,9 @@ struct dma_vec { * transaction is marked with DMA_PREP_REPEAT will cause the new transaction * to never be processed and stay in the issued queue forever. The flag is * ignored if the previous transaction is not a repeated transaction. + * @DMA_PREP_CACHE_CONTROL: tell the driver to direct destination writes into + * cache (cache-allocating) rather than bypassing it. The flag is advisory + * and drivers that cannot honour it will ignore it. */ enum dma_ctrl_flags { DMA_PREP_INTERRUPT = (1 << 0), @@ -213,6 +216,7 @@ enum dma_ctrl_flags { DMA_PREP_CMD = (1 << 7), DMA_PREP_REPEAT = (1 << 8), DMA_PREP_LOAD_EOT = (1 << 9), + DMA_PREP_CACHE_CONTROL = (1 << 10), }; /** -- 2.43.0