-
Notifications
You must be signed in to change notification settings - Fork 510
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
blk: change how the EZ flags are handled in the blk map #109
Conversation
👍 |
remaining = mlen; | ||
next_index = 0; | ||
} | ||
mapp[next_index++] = htole32(i | BTT_MAP_ENTRY_ZERO); |
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.
My intention (which I realize I didn't state very clearly) was that the map either known to be initialized to zero, or you initialize it to zero. I think that write_map()
no longer needs to store the identity values because you assume the value is the identity when btt_is_initial()
returns true.
So I like the logic you have, I just think write_map()
should simply zero the map.
Given this, I wonder if we should introduce an nszero
callback so the caller can use whatever optimized methods are available for zeroing pmem. What do you think?
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.
I think that it’s a good idea. I’ll use the pmem_memset for the nszero callback in pmemblk. The new sse versions written by Sarah should be pretty good for this.
cb4a657
to
fd6f18d
Compare
blk: change how the EZ flags are handled in the blk map
a8d51f0a4 Merge pull request pmem#111 from kswiecicki/kw-issues b1efa1c99 Merge pull request pmem#109 from KFilipek/add-casting dc88b63a0 masync: fix hashmap memory allocation 97055b841 masync: assert hashmap example copied value 701844c99 masync: fix hashmap example allocation checking 93b1698ff masync: fix hashmap example cleanup 7fa75e02f masync: avoid casting error on C++ compilation git-subtree-dir: src/deps/miniasync git-subtree-split: a8d51f0a46d8143cbbc5ac8ca272ad3ba19fed6e
a8d51f0a4 Merge pull request pmem#111 from kswiecicki/kw-issues b1efa1c99 Merge pull request pmem#109 from KFilipek/add-casting dc88b63a0 masync: fix hashmap memory allocation 97055b841 masync: assert hashmap example copied value 701844c99 masync: fix hashmap example allocation checking 93b1698ff masync: fix hashmap example cleanup 7fa75e02f masync: avoid casting error on C++ compilation git-subtree-dir: src/deps/miniasync git-subtree-split: a8d51f0a46d8143cbbc5ac8ca272ad3ba19fed6e
a8d51f0a4 Merge pull request pmem#111 from kswiecicki/kw-issues b1efa1c99 Merge pull request pmem#109 from KFilipek/add-casting dc88b63a0 masync: fix hashmap memory allocation 97055b841 masync: assert hashmap example copied value 701844c99 masync: fix hashmap example allocation checking 93b1698ff masync: fix hashmap example cleanup 7fa75e02f masync: avoid casting error on C++ compilation git-subtree-dir: src/deps/miniasync git-subtree-split: a8d51f0a46d8143cbbc5ac8ca272ad3ba19fed6e
This change reduces the time to write out the initial map in a zero-filled pool to zero.