Commit fe0f321
perf bench mem: Switch from zalloc() to mmap()
Using mmap() ensures that the buffer is always aligned at a fixed
boundary. Switch to that to remove one source of variability.
Since we always want to read/write from the allocated buffers map
with pagetables pre-populated.
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Raghavendra K T <raghavendra.kt@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>1 parent bdc22a8 commit fe0f321
1 file changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
289 | 306 | | |
290 | 307 | | |
291 | 308 | | |
292 | 309 | | |
293 | 310 | | |
294 | | - | |
| 311 | + | |
295 | 312 | | |
296 | 313 | | |
297 | 314 | | |
298 | | - | |
| 315 | + | |
299 | 316 | | |
300 | 317 | | |
301 | 318 | | |
| |||
306 | 323 | | |
307 | 324 | | |
308 | 325 | | |
309 | | - | |
310 | | - | |
| 326 | + | |
| 327 | + | |
311 | 328 | | |
312 | 329 | | |
313 | 330 | | |
| |||
0 commit comments