* vmalloc_to_page is contiguous ?
@ 2019-03-18 10:55 Ranran
2019-03-18 18:00 ` Rik van Riel
0 siblings, 1 reply; 2+ messages in thread
From: Ranran @ 2019-03-18 10:55 UTC (permalink / raw)
To: kernelnewbies
Hello,
Does vmalloc_to_page() returns contiguous physical memory ?
I ask becuase I see that its return value is used for DMA and DMA uses
contiguous memory.
see here:
https://elixir.bootlin.com/linux/latest/source/drivers/mtd/nand/onenand/samsung.c#L657
Yet, in vmalloc_to_page implementation:
https://elixir.bootlin.com/linux/v4.5/source/mm/vmalloc.c#L234
it does not seem that it creates a contiguous allocation.
Thank you,
ranran
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: vmalloc_to_page is contiguous ?
2019-03-18 10:55 vmalloc_to_page is contiguous ? Ranran
@ 2019-03-18 18:00 ` Rik van Riel
0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2019-03-18 18:00 UTC (permalink / raw)
To: Ranran, kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 800 bytes --]
On Mon, 2019-03-18 at 12:55 +0200, Ranran wrote:
> Hello,
>
> Does vmalloc_to_page() returns contiguous physical memory ?
> I ask becuase I see that its return value is used for DMA and DMA
> uses
> contiguous memory.
> see here:
>
https://elixir.bootlin.com/linux/latest/source/drivers/mtd/nand/onenand/samsung.c#L657
> Yet, in vmalloc_to_page implementation:
> https://elixir.bootlin.com/linux/v4.5/source/mm/vmalloc.c#L234
> it does not seem that it creates a contiguous allocation.
That is correct, vmalloc_to_page does not create anything.
All it does is find (and return) the page address of
a single vmalloc address.
If you have a vmalloc buffer larger than PAGE_SIZE, you
will have to call vmalloc_to_page to find each individual
page.
--
All Rights Reversed.
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-18 18:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 10:55 vmalloc_to_page is contiguous ? Ranran
2019-03-18 18:00 ` Rik van Riel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).