s390-tools: add hsavmcore utility

hsavmcore is designed to make the dump process with kdump more efficient.
With hsavmcore, the HSA memory that contains a part of the production
kernel's memory can be released early in the process. Depending on the size
of the production kernel's memory, writing the dump to persistent storage
can be time consuming and prevent the HSA memory from being reused
by other LPARs.

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Acked-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Alexander Egorenkov
2021-04-08 13:06:33 +02:00
committed by Jan Höppner
parent ce8383e5ac
commit 8c9cc6e12a
24 changed files with 2221 additions and 2 deletions

35
hsavmcore/proxy.h Normal file
View File

@@ -0,0 +1,35 @@
/*
* Copyright IBM Corp. 2021
*
* s390-tools is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
#ifndef _HSAVMCORE_PROXY_H
#define _HSAVMCORE_PROXY_H
#include "hsa.h"
/*
* A vmcore Proxy combines the original /proc/vmcore file with a HSA memory
* reader into a new interface which can be used to read vmcore data w/o being
* aware that the HSA memory region is NOT contained in the file /proc/vmcore.
*
* After releasing the HSA memory, the original /proc/vmcore will contain
* a *hole* where the HSA memory was located. The vmcore proxy hides this
* inconvenience from the user of this interface.
*/
struct vmcore_proxy;
struct vmcore_proxy *make_vmcore_proxy(const char *vmcore_path,
struct hsa_reader *hsa_reader);
void destroy_vmcore_proxy(struct vmcore_proxy *proxy);
long vmcore_proxy_size(struct vmcore_proxy *proxy);
int read_vmcore_proxy_at(struct vmcore_proxy *proxy, long offset, void *buf,
int size);
#endif