[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <181ee01d384.b809bd01412268.496620746959082770@linux.beauty>
Date: Tue, 12 Jul 2022 00:05:06 +0800
From: Li Chen <me@...ux.beauty>
To: "Christoph Hellwig" <hch@...radead.org>
Cc: "Catalin Marinas" <catalin.marinas@....com>,
"Will Deacon" <will@...nel.org>,
"Rob Herring" <robh+dt@...nel.org>,
"Frank Rowand" <frowand.list@...il.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"linux-arm-kernel" <linux-arm-kernel@...ts.infradead.org>,
"linux-kernel" <linux-kernel@...r.kernel.org>,
"devicetree" <devicetree@...r.kernel.org>,
"linux-mm" <linux-mm@...ck.org>
Subject: Re: [PATCH 0/4] add struct page and Direct I/O support to reserved
memory
Hi Christoph,
---- On Mon, 11 Jul 2022 23:01:32 +0800 Christoph Hellwig <hch@...radead.org> wrote ---
> Who is going to use it and how? Because normally the reserved memory
> is used through the DMA allocator, and you can't just do direct I/O
> to that.
>
My use case has been stated in the cover letter, but our driver is not ready for upstream yet.
With DMA allocator, we can access buffer in kernel space, not userspace, however, this patch
series servers for userspace direct I/O, so that you can mmap device file as src buffer from userspace,
and dio to file on disk.
There are some mmap + rmem cases in the kernel source tree which don't use the DMA allocator already.
I also found some users have asked for a solution of supporting direct I/O on file_operation->mmap like:
https://stackoverflow.com/questions/44820740/using-o-direct-with-io-memory
https://www.mail-archive.com/support-list@support.elphel.com/msg02314.html
I believe there are some other potential users who didn't post questions on the internet.
If the upstream kernel has this feature, these users can mmap their
reserved memory to userspace and get direct i/o support.
Regards,
Li
Powered by blists - more mailing lists