-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[WIP | DO NOT MERGE] zstd restructuring #9673
Conversation
@c0d3z3r0 Thanks for seperating those two branches! :) |
Ubuntu 16 failure of zloop is unrelated. @BrainSlayer @c0d3z3r0 besides the coverage tests zloop (lets away those)... no mutex errors appeared. |
@c0d3z3r0 Coverage test also completed zloop without mutex related errors. |
@c0d3z3r0 That would also do. if we get the mutex_exit error here now, we know this was the cause. |
@c0d3z3r0 Everything clear here except coverage test |
ok, then let's merge in BrainSlayers patches now |
@c0d3z3r0 In that one thats fine... There is no reasonable expectation for a mutex_exit error here atm. |
applied all... normally they get all tested |
@c0d3z3r0 |
no, this branch was missing my refactoring |
@c0d3z3r0 When this works, I suggest closing this draft PR and continue the work on the other one... |
I don't want to do too much spam... I'd close the other, continue work here and just open a new PR for final review |
Lets do that indeed... so Ack. |
@c0d3z3r0 Two failures in zloop currently. |
no. it was also no crash. looks like a irregular regular exit due io error |
@BrainSlayer Thats what I just said smartass. |
@c0d3z3r0 Tests finished, we can continue safely :) |
Okey... Before we start implementing your refactor one-by-one, 2 things needs to be done:
After those are merged we can readd the refactor points one by one... |
are you kidding me? ofc I have merged that commit.... have a close look again |
@BrainSlayer ping |
Morning @c0d3z3r0 |
sure, but a bit later; day job ;) |
@c0d3z3r0 dont bother. i just thought it was missing since zstd_free still had zstd_kmem_unknown as case. at the end i found out that i missed it. this is why i added a new patch (the one which solves the memleak) last evening. |
and yes. now we may refactor everything. i can also do some work in advance. for instance i want to get rid of the real_zstd_decompress functions etc. i see no reason to split it into 2 sub functions here. could be merged etc. but not that important. its just for easier reading |
@BrainSlayer |
since the majority of the refactoring process he did is just style based it could be done from scratch. especially if i rewrite functions from the ground. just some thoughts |
well, I would start adding my changes one by one (until it breaks again \o/), but please don't let's work concurrent, as we both will have to rebase again and again. let me finish here and then let us BOTH start from THE SAME codebase :) |
Oh, it could be Linux kernel compile-time checks, too (CONFIG_STACK_VALIDATION) |
But lets be clear... @dan-and what we are discussing is if we can hide this. It indeed seems to bea related error to the other hidden one... |
Some good news: |
I will remove all "well known" parts, which have nothing to do with the PR. Give me a bit of time to complete this. Updated with details to compiler and kernel version. |
objtool warnings can be ignored. i do compile zfs with gcc 9.1 bzw. on kernel 5.4 |
see also #6950 |
Thanks @BrainSlayer |
Okey, a headsup: I have found a way to cleanly exclude paths from code coverage. Now I'm doing some small refactoring and syntax tests on said solution to find the cleanest and maintanable solution for the ignores. I estimate i'll have a good PR in tomorrow, which I should be able to get merged in 1 or 2 days, as its relatively simple. Together with that PR i'll send @c0d3z3r0 a PR to add the ignore here too. We can clean the duplicates during rebase quite easily as it is just a few rows. I'll also make sure the PR description file gets updated accordingly. That would delay schedule a bit, but 2-3 days won't be a problem I think :) |
Perfect! :) |
Preliminary codecoverage ignore fix is ready here: #9726 It am not 100% certain the quoting when using @c0d3z3r0 I don't think I even need to write you the oneliner you need to ignore zstd if you read my changes, do I? ;) Do remember this replaces(!) the previous ignore fix! |
aece48d
to
6e2c7ab
Compare
@Ornias1993 very nice :) integrated |
oops.. newline f**+up |
- Removes broken codecov ignore - Places ignore section ax_code_coverage - Modifies LCOV command to deal with multiple ignored paths - Forwards users from codecov to LCOV for ignores Signed-off-by: Kjeld Schouten-Lebbing <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]>
6e2c7ab
to
b4c8d70
Compare
oh damn.... one shouldn't touch code, while hungry.... -.- |
This imports the unmodified ZStandard source to contrib/ which will be used by ZFS. This code shall not be modified in any way to keep it easily updatable. Only the required files from lib/ are imported. contrib/zstd is excluded from codecov calculation as dependencies don't need full codecov. Signed-off-by: Allan Jude <[email protected]> Signed-off-by: Kjeld Schouten-Lebbing [email protected] Signed-off-by: Michael Niewöhner <[email protected]>
These files make ZStandard compile as a kernel module without modifying the ZStandard source files. Removed unexpanded SVN version tracking tags from FreeBSD Signed-off-by: Allan Jude <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]>
Extend APIs that deals with compression to also pass the compression level. Signed-off-by: Allan Jude <[email protected]> Signed-off-by: Sebastian Gottschall <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]>
Signed-off-by: Allan Jude <[email protected]> Signed-off-by: Sebastian Gottschall <[email protected]> Signed-off-by: Kjeld Schouten-Lebbing <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]>
This add a new build intermediary libzstd. This allows us to keep zstd cleanly separated from libzpool and to override the frame-size compiler option without for zstd only. (This is needed due to unused coude in the unmodified zstd source.) Signed-off-by: Michael Niewöhner <[email protected]>
Add zstd to the test suite - add zstd to history_002_pos.ksh - add random levels of zstd to history_002_pos.ksh - add zstd-fast to history_002_pos.ksh - add random levels of zstd-fast to history_002_pos.ksh Add documentation - add man page content - add README for contrib/zstd Fixup copyright headers of touched and new files - Adds copyright headers for Allan Jude / Klara Inc. - Added Ornias1993 Copyright - Cleans copyright header formatting Signed-off-by: Allan Jude <[email protected]> Signed-off-by: Sebastian Gottschall <[email protected]> Signed-off-by: Kjeld Schouten-Lebbing <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]>
b4c8d70
to
e1f088b
Compare
i should not code when i'm thirsty. especially on saturday nights |
@c0d3z3r0 That PR is now out for final review too btw, so drop a quick review if you like :) @c0d3z3r0 What you could do:
You should be able to do this without my PR being merged, those two do not rely on eachother anymore :) @c0d3z3r0 and @BrainSlayer I did some CPPCHECK tests and the issues that are there are from the library and are fixed in upcoming ZSTD 1.4.5 No new relevant issues it seems I also did additional testing on different values for I've seen no statistically relevant performance differences between the following values: So the guestimated 4 value is perfectly fine! :) |
try *2 or *1 :-) i have choosen 4 but believe 2 is enough. so even 4 was already a "i'm afraid" value :-) what issues do you refer too with CPPCHECK? |
@BrainSlayer I already discussed any issues with the folks at zstd. |
This is the WIP PR / branch where restructuring of #8941 and all related work happens (main parts of the code from @BrainSlayer and @allanjude).
Main goals: