From: Li Chen <me@linux.beauty>
To: "Christoph Hellwig" <hch@infradead.org>
Cc: "Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Frank Rowand" <frowand.list@gmail.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"linux-arm-kernel" <linux-arm-kernel@lists.infradead.org>,
"linux-kernel" <linux-kernel@vger.kernel.org>,
"devicetree" <devicetree@vger.kernel.org>,
"linux-mm" <linux-mm@kvack.org>
Subject: Re: [PATCH 0/4] add struct page and Direct I/O support to reserved memory
Date: Tue, 12 Jul 2022 08:14:56 +0800 [thread overview]
Message-ID: <181efc24bdd.108279419521615.7697137316951540027@linux.beauty> (raw)
In-Reply-To: <YsxLU66tNvi10c82@infradead.org>
Hi Christoph,
---- On Tue, 12 Jul 2022 00:09:55 +0800 Christoph Hellwig <hch@infradead.org> wrote ---
> On Tue, Jul 12, 2022 at 12:05:06AM +0800, Li Chen wrote:
> > My use case has been stated in the cover letter, but our driver is not ready for upstream yet.
>
> Which means we can't review the use case. I'd suggest you come back
> when you submit your driver.
Totally agree, but we plan to start rewriting the code of our video driver in a long time, it has many legacy codes and I need to rewrite a lot of codes to migrate to v4l2.
That's why I also submit a sample driver here: to make the review progress easier and don't need reviewers to read video driver codes.
>
> > With DMA allocator, we can access buffer in kernel space, not userspace, however, this patch
>
> Take a look at dma_mmap_* on how to map DMA coherent allocations to
> usersapce. This is of course easily possible.
>
Yes, I know them. They take use of remap_pfn_range, which set VM_IO and VM_PFNMAP on vma, so dio is not possible with them.
IIUC, if you want to expose the kernel's reserved memory to userspace, it doesn't matter whether the memory came from dma allocator or something else.
The point is if they want to get better throughput, they can consider replacing their dma_mmap_* with my reserved_mem_memremap_pages + reserved_mem_dio_mmap.
Regards,
Li
prev parent reply other threads:[~2022-07-12 0:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 12:24 Li Chen
2022-07-11 12:24 ` [PATCH 1/4] of: add struct page support to rmem Li Chen
2022-07-11 13:36 ` Arnd Bergmann
2022-07-11 14:51 ` Li Chen
2022-07-11 15:06 ` Arnd Bergmann
2022-07-12 3:13 ` Li Chen
2022-07-16 0:38 ` kernel test robot
2022-07-18 13:21 ` Dan Carpenter
2022-07-11 12:24 ` [PATCH 2/4] mm/sparse: skip no-map memblock check when fill_subsection_map Li Chen
2022-07-11 14:53 ` David Hildenbrand
2022-07-12 4:23 ` Li Chen
2022-07-12 7:31 ` David Hildenbrand
2022-07-12 9:31 ` Li Chen
2022-07-14 18:45 ` kernel test robot
2022-07-11 12:24 ` [PATCH 3/4] arm64: mm: move memblock_clear_nomap after __add_pages Li Chen
2022-07-11 12:24 ` [PATCH 4/4] sample/reserved_mem: Introduce a sample of struct page and dio support to no-map rmem Li Chen
[not found] ` <CAK8P3a2Mr0ZMXGDx6htYEbBBtm4mubk-meSASJjPRK1j1O-hEA@mail.gmail.com>
2022-07-12 0:26 ` Li Chen
[not found] ` <CAK8P3a30o1RLifV1TMqDJ26vLhVdOzz3wP6yPrayLV2GPxUtwQ@mail.gmail.com>
2022-07-12 9:58 ` Li Chen
[not found] ` <CAK8P3a3gX-JMh6E2X3rH+U37zhkA6b0+AJDtXCJfdZiMocxLjg@mail.gmail.com>
2022-07-12 10:55 ` Li Chen
2022-08-04 7:17 ` Li Chen
[not found] ` <CAK8P3a0zSGqj3YEi+i9yfSLk8-aJtyiY6Bj069cxCdErk81+cw@mail.gmail.com>
2022-08-04 10:07 ` Li Chen
[not found] ` <CAK8P3a2hyhzjYqeL1LY7WziDjXQJasg3jFe83eErzKgbfP-a3w@mail.gmail.com>
2022-08-05 15:28 ` David Hildenbrand
2022-07-11 15:01 ` [PATCH 0/4] add struct page and Direct I/O support to reserved memory Christoph Hellwig
2022-07-11 16:05 ` Li Chen
2022-07-11 16:09 ` Christoph Hellwig
2022-07-12 0:14 ` Li Chen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=181efc24bdd.108279419521615.7697137316951540027@linux.beauty \
--to=me@linux.beauty \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=hch@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=robh+dt@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox