~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/memblock/README

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/testing/memblock/README (Version linux-6.12-rc7) and /tools/testing/memblock/README (Version linux-5.8.18)


  1 ==================                                
  2 Memblock simulator                                
  3 ==================                                
  4                                                   
  5 Introduction                                      
  6 ============                                      
  7                                                   
  8 Memblock is a boot time memory allocator[1] th    
  9 the actual memory management is initialized. I    
 10 memory regions, mark them as available or rese    
 11 within the requested range and/or in specific     
 12                                                   
 13 Because it is used so early in the booting pro    
 14 difficult. This test suite, usually referred a    
 15 an attempt at testing the memblock mechanism.     
 16 consist of a series of checks that exercise bo    
 17 allocation functionalities of memblock. The ma    
 18 memory allocator is initialized at the build t    
 19 instance throughout the duration of the test.     
 20 each other, region arrays are reset in between    
 21                                                   
 22 As this project uses the actual memblock code     
 23 some of the kernel definitions were stubbed by    
 24 introduced memblock simulator (commit 16802e55    
 25 skeleton of the memblock simulator")) and a fe    
 26 before it. Most of them don't match the kernel    
 27 consult them first before making any significa    
 28                                                   
 29 Usage                                             
 30 =====                                             
 31                                                   
 32 To run the tests, build the main target and ru    
 33                                                   
 34 $ make && ./main                                  
 35                                                   
 36 A successful run produces no output. It is pos    
 37 by passing options from command line. For exam    
 38 append the `-v` options when you run the tests    
 39                                                   
 40 $ ./main -v                                       
 41                                                   
 42 This will print information about which functi    
 43 number of test cases that passed.                 
 44                                                   
 45 For the full list of options from command line    
 46                                                   
 47 It is also possible to override different conf    
 48 the test functions. For example, to simulate e    
 49                                                   
 50 $ make NUMA=1                                     
 51                                                   
 52 For the full list of build options, see `make     
 53                                                   
 54 Project structure                                 
 55 =================                                 
 56                                                   
 57 The project has one target, main, which calls     
 58 allocation functions. Tests for each group are    
 59 can be seen here:                                 
 60                                                   
 61 memblock                                          
 62 |-- asm       ------------------,                 
 63 |-- lib                         |-- implement     
 64 |-- linux     ------------------'                 
 65 |-- scripts                                       
 66 |    |-- Makefile.include        -- handles `m    
 67 |-- tests                                         
 68 |    |-- alloc_api.(c|h)         -- memblock_a    
 69 |    |-- alloc_helpers_api.(c|h) -- memblock_a    
 70 |    |-- alloc_nid_api.(c|h)     -- memblock_a    
 71 |    |-- basic_api.(c|h)         -- memblock_a    
 72 |    |-- common.(c|h)            -- helper fun    
 73 |-- main.c        --------------.   dummy phys    
 74 |-- Makefile                     `- test runne    
 75 |-- README                                        
 76 |-- TODO                                          
 77 |-- .gitignore                                    
 78                                                   
 79 Simulating physical memory                        
 80 ==========================                        
 81                                                   
 82 Some allocation functions clear the memory in     
 83 memblock to track valid memory ranges. To achi    
 84 with memblock memory stored by test_memory str    
 85 points to a block of memory allocated via mall    
 86 tests, dummy physical memory is allocated, add    
 87 at the end of the test run. The structure of a    
 88 functions is as follows:                          
 89                                                   
 90 int memblock_alloc_foo_checks(void)               
 91 {                                                 
 92         reset_memblock_attributes();     /* da    
 93         dummy_physical_memory_init();    /* al    
 94                                                   
 95         (...allocation checks...)                 
 96                                                   
 97         dummy_physical_memory_cleanup(); /* fr    
 98 }                                                 
 99                                                   
100 There's no need to explicitly free the dummy m    
101 memblock_free() call. The entry will be erased    
102 called at the beginning of each test.             
103                                                   
104 Known issues                                      
105 ============                                      
106                                                   
107 1. Requesting a specific NUMA node via membloc    
108    intended. Once the fix is in place, tests f    
109                                                   
110 2. Tests for memblock_alloc_low() can't be eas    
111    ARCH_LOW_ADDRESS_LIMIT marco, which can't b    
112    memory of the memory_block.                    
113                                                   
114 References                                        
115 ==========                                        
116                                                   
117 1. Boot time memory management documentation p    
118    https://www.kernel.org/doc/html/latest/core    
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php