From: Mounesh Badiger <mounesh.b@gmail.com>
To: David Hildenbrand <david@redhat.com>
Cc: linux-mm@kvack.org
Subject: Re: kmalloc() question - migration/remap of kmalloc()'ed pages
Date: Thu, 25 Apr 2024 15:18:42 +0530 [thread overview]
Message-ID: <CAOGU1pxAwK3YFEPfb--DHNSti2xtWUM9guiPm3DgKAS8hV7SFQ@mail.gmail.com> (raw)
In-Reply-To: <20493de7-9367-4453-84c4-23d2db1b5986@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]
Thanks for the confirmation.
I am using remap_pfn_range(). I can use alloc_pages() instead of kmalloc().
On Thu, Apr 25, 2024 at 3:06 PM David Hildenbrand <david@redhat.com> wrote:
> On 25.04.24 11:21, Mounesh Badiger wrote:
> > Hi,
>
> Hi,
>
> >
> > We have a device driver that allocates physical pages using kmalloc()
> > and these pages are mapped to the userspace process via mmap.
>
> Which interface are you using for inserting these pages into the page
> tables?
>
> remap_pfn_range? vm_insert_page() ? ...
>
> Using kmalloc sound weird ... why not simply alloc_pages()?
>
> >
> > Does the kmalloc()'ed memory mapped to userspace can migrate or get
> > remapped due to any of kernel mm operations?
>
> No.
>
> >
> > we are looking to keep VA->PA mapping intact from a
> > userspace process point of view.
>
> That will work.
>
> --
> Cheers,
>
> David / dhildenb
>
>
--
Mounesh Badiger
Support for education
Visit*: www.vidyaposhak.org <http://www.vidyaposhak.org/> *
[-- Attachment #2: Type: text/html, Size: 1822 bytes --]
next prev parent reply other threads:[~2024-04-25 9:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 9:21 Mounesh Badiger
2024-04-25 9:36 ` David Hildenbrand
2024-04-25 9:48 ` Mounesh Badiger [this message]
2024-04-25 9:51 ` David Hildenbrand
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=CAOGU1pxAwK3YFEPfb--DHNSti2xtWUM9guiPm3DgKAS8hV7SFQ@mail.gmail.com \
--to=mounesh.b@gmail.com \
--cc=david@redhat.com \
--cc=linux-mm@kvack.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