mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump: Increase output buffer from 8 pages to 1 Mb
Increase the auxiliary buffer size from 8 pages to 1 megabyte in order to significantly increase compressed dump processing speed. For uncompressed dumps, the effect is minor. Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
271b809495
commit
14a79eb142
@@ -14,10 +14,12 @@
|
||||
#include "dfo.h"
|
||||
#include "output.h"
|
||||
|
||||
#define BUFFER_SIZE (1 * MIB)
|
||||
|
||||
int write_dump(FILE *stream)
|
||||
{
|
||||
const u64 output_size = dfo_size();
|
||||
char buf[8UL * PAGE_SIZE];
|
||||
char *buf = zg_alloc(BUFFER_SIZE);
|
||||
u64 written = 0;
|
||||
|
||||
if (!dfi_feat_copy())
|
||||
@@ -31,7 +33,7 @@ int write_dump(FILE *stream)
|
||||
size_t rc;
|
||||
u64 cnt;
|
||||
|
||||
cnt = dfo_read(buf, sizeof(buf));
|
||||
cnt = dfo_read(buf, BUFFER_SIZE);
|
||||
rc = fwrite(buf, cnt, 1, stream);
|
||||
if (rc != 1 && ferror(stream))
|
||||
ERR_EXIT("Error: Write failed");
|
||||
@@ -40,5 +42,6 @@ int write_dump(FILE *stream)
|
||||
};
|
||||
STDERR("\n");
|
||||
STDERR("Success: Dump has been copied\n");
|
||||
zg_free(buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user