feat: disable mask
This commit is contained in:
parent
96bd340675
commit
138868b66f
@ -18,7 +18,8 @@
|
|||||||
#define ALIGN_std 2 << 20
|
#define ALIGN_std 2 << 20
|
||||||
#define PATT_LEN 1024
|
#define PATT_LEN 1024
|
||||||
#define AGGR_std 2
|
#define AGGR_std 2
|
||||||
#define HUGE_YES
|
|
||||||
|
// #define HUGE_YES
|
||||||
|
|
||||||
typedef struct ProfileParams {
|
typedef struct ProfileParams {
|
||||||
uint64_t g_flags = 0;
|
uint64_t g_flags = 0;
|
||||||
@ -32,7 +33,7 @@ typedef struct ProfileParams {
|
|||||||
size_t rounds = ROUNDS_std;
|
size_t rounds = ROUNDS_std;
|
||||||
size_t base_off = 0;
|
size_t base_off = 0;
|
||||||
char *huge_file = (char *) HUGETLB_std;
|
char *huge_file = (char *) HUGETLB_std;
|
||||||
int huge_fd;
|
int huge_fd = 0;
|
||||||
char *conf_file = (char *) CONFIG_NAME_std;
|
char *conf_file = (char *) CONFIG_NAME_std;
|
||||||
int aggr = AGGR_std;
|
int aggr = AGGR_std;
|
||||||
} ProfileParams;
|
} ProfileParams;
|
||||||
|
@ -1,54 +1,48 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#define STRIPE_SHIFT 0 // not needed anymore
|
#define STRIPE_SHIFT 0 // not needed anymore
|
||||||
#define O2Z (0b01 << STRIPE_SHIFT) // ONE_TO_ZERO
|
#define O2Z (0b01 << STRIPE_SHIFT)// ONE_TO_ZERO
|
||||||
#define Z2O (0b10 << STRIPE_SHIFT) // ZERO_TO_ONE
|
#define Z2O (0b10 << STRIPE_SHIFT)// ZERO_TO_ONE
|
||||||
#define REVERSE_VAL (O2Z ^ Z2O) // if you xor REVERSE with one of the stripe val it will give you the opposite
|
#define REVERSE_VAL (O2Z ^ Z2O) // if you xor REVERSE with one of the stripe val it will give you the opposite
|
||||||
|
|
||||||
static const char *config_str[] =
|
static const char *config_str[] = {"assisted-dbl", "free-triple", "%i_sided"};
|
||||||
{ "assisted-dbl", "free-triple", "%i_sided"};
|
static const char *data_str[] = {"random", "i2o", "o2i"};
|
||||||
static const char *data_str[] = { "random", "i2o", "o2i" };
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ASSISTED_DOUBLE_SIDED,
|
ASSISTED_DOUBLE_SIDED,
|
||||||
FREE_TRIPLE_SIDED,
|
FREE_TRIPLE_SIDED,
|
||||||
N_SIDED,
|
N_SIDED,
|
||||||
} HammerConfig;
|
} HammerConfig;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum { RANDOM, ONE_TO_ZERO = O2Z, ZERO_TO_ONE = Z2O, REVERSE = REVERSE_VAL } HammerData;
|
||||||
RANDOM,
|
|
||||||
ONE_TO_ZERO = O2Z,
|
|
||||||
ZERO_TO_ONE = Z2O,
|
|
||||||
REVERSE = REVERSE_VAL
|
|
||||||
} HammerData;
|
|
||||||
|
|
||||||
typedef uint64_t physaddr_t;
|
typedef uint64_t physaddr_t;
|
||||||
|
|
||||||
/* not necessarily page-aligned addresses.
|
/* not necessarily page-aligned addresses.
|
||||||
used only to keep track of virt<->phys mapping. */
|
used only to keep track of virt<->phys mapping. */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *v_addr;
|
char *v_addr;
|
||||||
physaddr_t p_addr;
|
physaddr_t p_addr;
|
||||||
} pte_t;
|
} pte_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
HammerConfig h_cfg;
|
HammerConfig h_cfg;
|
||||||
HammerData d_cfg;
|
HammerData d_cfg;
|
||||||
size_t h_rows;
|
size_t h_rows;
|
||||||
size_t h_rounds;
|
size_t h_rounds;
|
||||||
size_t base_off; // offset from the beginning of the contig chunk
|
size_t base_off;// offset from the beginning of the contig chunk
|
||||||
int aggr_n;
|
int aggr_n;
|
||||||
} SessionConfig;
|
} SessionConfig;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *buffer; // base addr
|
char *buffer; // base addr
|
||||||
pte_t *physmap; // list of virt<->phys mapping for every page
|
pte_t *physmap;// list of virt<->phys mapping for every page
|
||||||
int fd; // fd in the case of mmap hugetlbfs
|
int fd; // fd in the case of mmap hugetlbfs
|
||||||
uint64_t size; // in bytes
|
uint64_t size; // in bytes
|
||||||
uint64_t align;
|
uint64_t align;
|
||||||
uint64_t flags; // from params
|
uint64_t flags;// from params
|
||||||
} MemoryBuffer;
|
} MemoryBuffer;
|
||||||
|
Loading…
Reference in New Issue
Block a user