Skip to content

Commit

Permalink
Change settings for 750G environment
Browse files Browse the repository at this point in the history
  • Loading branch information
hishine6 committed Aug 22, 2021
1 parent 49d5d9a commit 46f3c85
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
1 change: 0 additions & 1 deletion fs/nova/dedup.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ int nova_dedup_FACT_read(struct super_block *sb, u64 index){
r_count >>= 4;
u_count &= 15;

printk("Fingerprint:%X%X%X%X%X%X%X%X%X%X%X%X%X%X%X%X%X%X%X%X, Block address: %lu, Reference count: %d, Update count: %d, next: %d, delete_address: %d\n", fingerprint[0],fingerprint[1],fingerprint[2],fingerprint[3],fingerprint[4],fingerprint[5],fingerprint[6],fingerprint[7],fingerprint[8],fingerprint[9],fingerprint[10],fingerprint[11],fingerprint[12],fingerprint[13],fingerprint[14],fingerprint[15],fingerprint[16],fingerprint[17],fingerprint[18],fingerprint[19],block_address,r_count,u_count,next,delete_address);
printk("FACT table insert complete, reference count: %d, update count: %d\n",r_count,u_count);
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion fs/nova/dedup.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define MAX_DATAPAGE_PER_WRITEENTRY 32
/* nova_dedup_queue
queue of entries that needs to be deduplicated
*/
*/
struct nova_dedup_queue_entry{
u64 write_entry_address;
u64 target_inode_number;
Expand Down
2 changes: 1 addition & 1 deletion fs/nova/nova_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,6 @@ static inline void nova_flush_buffer(void *buf, uint32_t len, bool fence)
#define NOVA_STRIPE_SIZE (1 << NOVA_STRIPE_SHIFT)

/* NOVA DEDUP KHJ */
#define NOVA_FACT_ENTRY_SIZE 40
#define NOVA_FACT_ENTRY_SIZE 64

#endif /* _LINUX_NOVA_DEF_H */
17 changes: 11 additions & 6 deletions fs/nova/super.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,22 @@ struct nova_super_block {
/* NOVA DEDUP KHJ */
/*
* 4G Environment
* Block 64 - 5183 Static FACT Table (20MB)
* Block 64 - 5183 Static FACT Table (64MB)
* Index 0 ~ (2^20 - 1)
* 750G Environment
* Block 64 ~ 3072063 (almost 12GB)
* Index 0 ~ (750*2^18 - 1)
* 1T Environment
* Block 64 ~ 1310783 Static FACT Table (5GB)
* Index 0 ~ (2^28 - 1) --> 1T Environment
* Block 64 ~ 1310783 (16GB)
* Index 0 ~ (2^28 - 1)
*/
#define FACT_TABLE_INDEX_MAX 1048575 // 2^20 - 1 (4G ENV)
// #define FACT_TABLE_INDEX_MAX 1048575 // 2^20 - 1 (4G ENV)
// #define FACT_TABLE_INDEX_MAX 268435455 // 2^28 -1 (1TB ENV)
#define HEAD_RESERVED_BLOCKS 63 + ((FACT_TABLE_INDEX_MAX+1)*20)/4096
// 20 - FACT entry size
#define FACT_TABLE_INDEX_MAX (unsigned long)196607999 // 750 * 2^18 - 1 (750GB ENV)
#define HEAD_RESERVED_BLOCKS (unsigned long)63 + ((unsigned long)(FACT_TABLE_INDEX_MAX+1)*64)/4096
// 64 - FACT entry size
// 4096 - Block size
#define NUM_JOURNAL_PAGES 16

Expand Down

0 comments on commit 46f3c85

Please sign in to comment.