-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
287 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,43 @@ | ||
--- fs_mark-3.3/fs_mark.h 2023-07-10 15:47:05.889696230 +0200 | ||
+++ fs_mark-3.3.phoenix/fs_mark.h 2023-08-01 12:19:29.380631828 +0200 | ||
@@ -125,7 +125,7 @@ | ||
+++ fs_mark-3.3.phoenix/fs_mark.h 2023-09-25 16:13:58.406462448 +0200 | ||
@@ -22,10 +22,10 @@ | ||
/* | ||
* Default and maximum parameters. | ||
*/ | ||
-#define MAX_IO_BUFFER_SIZE (1024 * 1024) /* Max write buffer size is 1MB */ | ||
+#define MAX_IO_BUFFER_SIZE (1024) /* Max write buffer size is 1MB */ | ||
#define MAX_FILES (1000000) /* Max number of files to test of each size */ | ||
#define MAX_THREADS (64) /* Max number of threads allowed */ | ||
-#define MAX_NAME_PATH (1000) /* Length of the pathname before the leaf */ | ||
+#define MAX_NAME_PATH (200) /* Length of the pathname before the leaf */ | ||
#define FILENAME_SIZE (128) /* Max length of filenames */ | ||
#define MAX_STRING_SIZE (160) /* Max number of bytes in a string */ | ||
|
||
@@ -34,7 +34,7 @@ | ||
*/ | ||
#define DEFAULT_SECS_PER_DIR (180) | ||
#define DEFAULT_FILE_SIZE (50 * 1024) | ||
-#define DEFAULT_IO_SIZE (16 * 1024) | ||
+#define DEFAULT_IO_SIZE (1024) | ||
#define DEFAULT_NUM_FILES (1000) | ||
#define DEFAULT_NAME_LEN (40) | ||
#define DEFAULT_RAND_NAME (24) | ||
@@ -91,6 +91,9 @@ | ||
"SYNC POST: Issue sync() and then reopen and fsync() each file in order after main write loop." | ||
}; | ||
|
||
+#ifdef NOMMU | ||
+unsigned int dummyfs_size = 0; | ||
+#endif | ||
|
||
/* | ||
* Use the normal fsync() per file by default | ||
@@ -125,7 +128,7 @@ | ||
int num_threads = 1; /* Number of threads */ | ||
int do_fill_fs = 0; /* Run until the file system is full */ | ||
int verbose_stats = 0; /* Print complete stats for each system call */ | ||
-char log_file_name[PATH_MAX] = "fs_log.txt"; /* Log file name for run */ | ||
+char log_file_name[PATH_MAX - 16] = "fs_log.txt"; /* Log file name for run - reserve place for suffix */ | ||
FILE *log_file_fp; /* Parent file pointer for log file */ | ||
FILE *child_log_file_fp; /* Child file pointer for log file */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- fs_mark-3.3/Makefile 2023-07-10 15:47:05.889696230 +0200 | ||
+++ fs_mark-3.3.phoenix/Makefile 2023-09-21 18:13:25.684372413 +0200 | ||
@@ -1,4 +1,4 @@ | ||
-# | ||
+#### | ||
# Simple makefile for file latency test program | ||
# | ||
# fs_mark.c is a modified version of Larry McVoy's lmbench program. | ||
@@ -6,29 +6,24 @@ | ||
# Modifications include using fsync after wrting to flush to disk and changes to check return | ||
# values from syscalls. | ||
# | ||
-DIR1= /test/dir1 | ||
-DIR2= /test/dir2 | ||
- | ||
-COBJS= fs_mark.o lib_timing.o | ||
|
||
-CC ?= gcc | ||
-CFLAGS ?= -O2 | ||
-LDFLAGS ?= | ||
-CFLAGS += -Wall -D_FILE_OFFSET_BITS=64 | ||
+include ../../../../phoenix-rtos-build/Makefile.common | ||
|
||
-all: fs_mark | ||
+.DEFAULT_GOAL := all | ||
|
||
-fs_mark.o: fs_mark.c fs_mark.h | ||
+# default path for the programs to be installed in rootfs | ||
+DEFAULT_INSTALL_PATH := /bin | ||
|
||
-fs_mark: fs_mark.o lib_timing.o | ||
- $(CC) $(CFLAGS) -o fs_mark fs_mark.o lib_timing.o $(LDFLAGS) | ||
+NAME := fs_mark | ||
+LOCAL_SRCS := fs_mark.c lib_timing.c | ||
+LOCAL_LDFLAGS += -z stack-size=22288 | ||
|
||
-test: fs_mark | ||
- ./fs_mark -d ${DIR1} -d ${DIR2} -s 51200 -n 4096 | ||
- ./fs_mark -d ${DIR1} -d ${DIR2} -s 51200 -n 4096 -r | ||
- ./fs_mark -d ${DIR1} -d ${DIR2} -s 51200 -n 4096 -D 128 | ||
- ./fs_mark -d ${DIR1} -d ${DIR2} -s 51200 -n 4096 -r -D 128 | ||
+include $(binary.mk) | ||
|
||
-clean: | ||
- rm -f ${COBJS} fs_mark fs_log.txt | ||
+# create generic targets | ||
+DEFAULT_COMPONENTS := $(ALL_COMPONENTS) | ||
|
||
+.PHONY: all install clean | ||
+all: $(DEFAULT_COMPONENTS) | ||
+install: $(patsubst %,%-install,$(DEFAULT_COMPONENTS)) | ||
+clean: $(patsubst %,%-clean,$(ALL_COMPONENTS)) |