Skip to content
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

Merged
merged 1 commit into from
Jan 21, 2015

Conversation

tomaszkapela
Copy link
Contributor

This change reduces the time to write out the initial map in a zero-filled pool to zero.

@krzycz
Copy link
Contributor

krzycz commented Jan 17, 2015

👍

remaining = mlen;
next_index = 0;
}
mapp[next_index++] = htole32(i | BTT_MAP_ENTRY_ZERO);
Copy link
Member

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?

Copy link
Contributor Author

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.

andyrudoff pushed a commit that referenced this pull request Jan 21, 2015
blk: change how the EZ flags are handled in the blk map
@andyrudoff andyrudoff merged commit c7598fa into pmem:master Jan 21, 2015
@tomaszkapela tomaszkapela deleted the blk-map-write-change branch May 16, 2016 14:59
lplewa added a commit to lplewa/pmdk that referenced this pull request Aug 25, 2022
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
lplewa added a commit to lplewa/pmdk that referenced this pull request Aug 25, 2022
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
hswong3i pushed a commit to alvistack/pmem-pmdk that referenced this pull request Feb 28, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants