All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Question regarding pinning of memory
       [not found] <1076302825.4233137.1715068078694.ref@mail.yahoo.com>
@ 2024-05-07  7:47 ` sunil bhargo
  2024-05-07  8:09   ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: sunil bhargo @ 2024-05-07  7:47 UTC (permalink / raw
  To: linux-mm@kvack.org; +Cc: mounesh.b@gmail.com

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

Hi,   We have written an application that would open a device and then mmap it.   In the kernel module the memory is allocated using vmalloc (don't require contiguous physical memory)  and in mmap we are calling remap_pfn_range to map the memory to user space.   The question is would this mechanism be enough that the memory would be pinned (neither swappable nor the page migration would happen) ?
Thanks,Sunil Bhargo

[-- Attachment #2: Type: text/html, Size: 1409 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question regarding pinning of memory
  2024-05-07  7:47 ` Question regarding pinning of memory sunil bhargo
@ 2024-05-07  8:09   ` David Hildenbrand
  0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2024-05-07  8:09 UTC (permalink / raw
  To: sunil bhargo, linux-mm@kvack.org; +Cc: mounesh.b@gmail.com

On 07.05.24 09:47, sunil bhargo wrote:
> Hi,
>     We have written an application that would open a device and then 
> mmap it.
>     In the kernel module the memory is allocated using vmalloc (don't 
> require contiguous physical memory)  and in mmap we are calling 
> remap_pfn_range to map the memory to user space.
>     The question is would this mechanism be enough that the memory would 
> be pinned (neither swappable nor the page migration would happen) ?

Recent related question:

https://lore.kernel.org/linux-mm/ea59a8b7-6167-4ab1-92f2-f2a171310a50@redhat.com/T/

-- 
Cheers,

David / dhildenb



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-07  8:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1076302825.4233137.1715068078694.ref@mail.yahoo.com>
2024-05-07  7:47 ` Question regarding pinning of memory sunil bhargo
2024-05-07  8:09   ` David Hildenbrand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.