[bootlin/training-materials updates] master: slides/kernel-driver-development-memory: Clarify vmalloc (1230beb8)

Miquel Raynal miquel.raynal at bootlin.com
Fri Mar 24 18:46:37 CET 2023


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/1230beb8d83a7f465243276961bd9dbe2a1326f2

>---------------------------------------------------------------

commit 1230beb8d83a7f465243276961bd9dbe2a1326f2
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Tue Mar 21 12:33:47 2023 +0100

    slides/kernel-driver-development-memory: Clarify vmalloc
    
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


>---------------------------------------------------------------

1230beb8d83a7f465243276961bd9dbe2a1326f2
 .../kernel-driver-development-memory.tex                      | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex b/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex
index 5abdb1c7..e9c9fb3a 100644
--- a/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex
+++ b/slides/kernel-driver-development-memory/kernel-driver-development-memory.tex
@@ -324,16 +324,15 @@ kfree(tprops);
   \begin{itemize}
   \item The \kfunc{vmalloc} allocator can be used to obtain
     memory zones that are contiguous in the virtual addressing space,
-    but not made out of physically contiguous pages. The
-    requested memory size is rounded up to the next page.
+    but not made out of physically contiguous pages.
+  \item The requested memory size is rounded up to the next page (not
+    efficient for small allocations).
   \item The allocated area is in the kernel space part of the address
     space, but outside of the identically-mapped area
   \item Allocations of fairly large areas is possible (almost as big
     as total available memory, see \url{https://j.mp/YIGq6W} again),
-    since physical memory fragmentation is not an issue, but areas
-    cannot be used for DMA, as DMA usually requires physically
-    contiguous buffers.
-  \item Example use: to allocate kernel buffers to load module code.
+    since physical memory fragmentation is not an issue.
+  \item Not suitable for DMA purposes.
   \item API in \kfile{include/linux/vmalloc.h}
     \begin{itemize}
     \item \mint{c}+void *vmalloc(unsigned long size);+




More information about the training-materials-updates mailing list