Skip to content

Commit 0c8eef8

Browse files
committed
x86_64: Try directmap locations starting from the most recent kernel
It is more likely to open a dump from a recent kernel than from a historic one, so let's optimize for that case. Signed-off-by: Petr Tesarik <[email protected]>
1 parent 4b65ca0 commit 0c8eef8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/addrxlat/x86_64.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,13 @@ set_pgt_fallback(addrxlat_sys_t *sys, addrxlat_sys_meth_t idx)
404404
static addrxlat_status
405405
linux_rdirect_map(struct os_init_data *ctl)
406406
{
407-
/** Possible direct mapping locations (if not randomized). */
407+
/** Possible direct mapping locations (if not randomized).
408+
* Try more recent kernels first.
409+
*/
408410
static const addrxlat_addr_t fixed_loc[] = {
409-
LINUX_DIRECTMAP_START_2_6_0,
410-
LINUX_DIRECTMAP_START_2_6_11,
411411
LINUX_DIRECTMAP_START_2_6_31,
412+
LINUX_DIRECTMAP_START_2_6_11,
413+
LINUX_DIRECTMAP_START_2_6_0,
412414
};
413415

414416
struct sys_region layout[2];

0 commit comments

Comments
 (0)