Repository navigation
multiload: add -f to fill the arenas from a file - #65
Open
jalanmiddleton wants to merge 1 commit into
Open
jalanmiddleton wants to merge 1 commit into
jalanmiddleton wants to merge 1 commit into
Conversation
Multiload always fills its arenas with a constant pattern (memset 1 for loads, zeros for the chase). For memory devices which handle different types of data differently (e.g. compression), this only offers one possible test case. Add -f FILE, which fills every arena with the contents of a regular file, so the arena contents can be set arbitrarily. fill_arena_from_file() reads the file into the start of the arena with pread(), and then tiles the rest by doubling the filled prefix with memcpy(). Load threads fill their own arenas in place of the existing memset; the chase arena is filled before the chase is generated. This is different from multichase's -f, where alloc_arena_mmap() uses a passed-in file as the arena itself. -f is rejected together with -L, because the longer chase expects every slot to start NULL. Directories, devices, empty files, and a second -f are also rejected.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multiload currently fills its arenas with constant patterns. For memory devices which handle different types of data differently (e.g. compression), this only offers one possible test case. Add -f FILE, which fills every arena with the contents of a regular file, so the arena contents can be set arbitrarily.
This change is different from multichase's -f, where alloc_arena_mmap() uses a passed-in file as the arena itself. This code does not use the file itself as the arena, but copies the contents to separate buffers. Without -f, behavior is maintained.
This is the first of three related multiload changes for configurable memory bandwidth patterns:
The plan is to add the other two features in separate PRs, but this could be handled with multiple commits as well.