-
Notifications
You must be signed in to change notification settings - Fork 3
Prefetch manage #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: team_Storage
Are you sure you want to change the base?
Prefetch manage #59
Conversation
CachePrefetchManagementApi.h
Outdated
| @@ -0,0 +1,12 @@ | |||
| #pragma once | |||
| #include "CachePrefetchManagement.h" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the include
move range struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
we didnt move range struct
CachePrefetchManagementApi.h
Outdated
| bool IsRangeInLoadingAPI(Range_t rangeForSearch); | ||
|
|
||
| //function that get range to remove, find it and delete it from loadingArray | ||
| void RemoveRangeFromLoadingRangesAPI(Range_t rangeForRemove); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove API
add prefetch to begining
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| @@ -0,0 +1,125 @@ | |||
| #pragma once | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
CachePrefetchManagement.h
Outdated
| #include <stdbool.h> | ||
| #include <stdlib.h> // For malloc, free | ||
| #define COLLECTION_SIZE 4 | ||
| #define RANGE_LENGTH 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supportedRangeLengh/width
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CachePrefetchManagement.h
Outdated
| #define RANGE_WIDTH 1 | ||
| #define INIT_COUNTER_LEN 2 | ||
| #define SIZE_OF_ENOUGH_SEQ 3 | ||
| #define INIT_POINT { -1,-1 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initPointValue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CachePrefetchManagement.h
Outdated
| #define SIZE_OF_ENOUGH_SEQ 3 | ||
| #define INIT_POINT { -1,-1 } | ||
| #define COUNT_OF_RANGE_TO_READING_AHEAD 2 | ||
| #define INIT_RANGE {INIT_POINT,INIT_POINT} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initRangeVal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| #define INIT_RANGE {INIT_POINT,INIT_POINT} | ||
|
|
||
| //struct that representing a point in a plane | ||
| typedef struct Point_s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CachePrefetchManagement.h
Outdated
| Range_t nextExpectedRange; | ||
| Range_Direction_t dir; | ||
| int counterUse; | ||
| int counterLength; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CachePrefetchManagement.h
Outdated
|
|
||
| //control block of the program | ||
| typedef struct SequenceCollectionCtrlBlk_s { | ||
| SeqRangeInfo_t* seqRangeInfoArray[COLLECTION_SIZE]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collectionSize->max Supported parallel range
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CachePrefetchManagement.h
Outdated
| //control block of the program | ||
| typedef struct SequenceCollectionCtrlBlk_s { | ||
| SeqRangeInfo_t* seqRangeInfoArray[COLLECTION_SIZE]; | ||
| Range_t singleRangesArray[COLLECTION_SIZE]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create struct of singleRangesArray
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done:)))
CachePrefetchManagement.h
Outdated
| #pragma region Range Functions | ||
|
|
||
| //function that init the range | ||
| Range_t GetDefaultRange(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add (void)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CachePrefetchManagement.h
Outdated
| //function that init the range | ||
| Range_t GetDefaultRange(); | ||
|
|
||
| //function that get direction, range and num, and return the next range by the direction, double the num |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explain more the counter
CachePrefetchManagement.h
Outdated
| int GetLastUsedSequence(); | ||
|
|
||
| //external function of insert new range | ||
| void InsertNewRangeAPI(Range_t range); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if remove
CachePrefetchManagement.h
Outdated
| void InsertNewRangeAPI(Range_t range); | ||
|
|
||
| //internal function that called by the external function-InsertNewRangeAPI | ||
| TYPE_OF_ACTION_THAT_ACCURED_IN_INSERT_t InsertNewRange(Range_t range); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
insert action type
internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CachePrefetchManagement.h
Outdated
| int IsRangeCreateNewSequence(Range_t range); | ||
|
|
||
| //function that get index of seq that update now and up the counter use of the others seqs | ||
| void UpCounterUseOfSeqsOthers(int index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
increase all LRU conter except specific counter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CachePrefetchManagement.h
Outdated
| bool CheckValidationOfRange(Range_t range); | ||
| #pragma endregion | ||
|
|
||
| void INIT(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to API
add prefecth to name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CachePrefetchManagement.h
Outdated
|
|
||
| void INIT(); | ||
|
|
||
| void SendLoadingRangeToAPI(Range_t range); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
No description provided.