-
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
Remove unused bits of libunicode #13224
Conversation
Real
so -168448 (25 bytes more than predicted). |
57fefd8
to
c06379a
Compare
2.5 week bump; all-minus, clean CI, NFC |
The change itself looks correct. My only real concern is that it modifies stable committed interfaces which we inherited from Solaris. That interface is clearly documented here. https://docs.oracle.com/cd/E88353_01/html/E37855/u8-strcmp-9f.html Now practically speaking I doubt it really matters that much for a few reasons. 1) there are no external consumers of this interface on Linux or FreeBSD. 2) we've never done a major update to the unicode library/kmod and it seems unlikely it will ever be needed. And 3) the only case where this would be an issue is if illumos was using the OpenZFS sources along with their native kernel provided unicode interfaces. However, even in this case all but one caller are in the platform specific code so it would be at worst a mild inconvenience. Still I'm reluctant to break this committed interface just to shed some unused code. |
I mean, nothing's ever used it here, we're dropping 168k of .rodata. And it's a committed interface for... Solaris. Like most of the stuff I ripped out of ICP (there was a module system, hardware providers, &c.), which was an interface other modules probably (definitely?) hooked into. Like a lot of that code, it seems to've been grandfathered in because it's in /u/s/common/unicode. AFAIK we have one real downstream, Lustre, and it uses none of these. The illumos gate doesn't use most of them. There's one use of U8_UNICODE_320, which is I don't think this is a realistic concern for us. Because we're not Solaris. Hell, we don't expose this to userspace, so kSolaris. And we get a considerable amount of dead kernel address-space back. And by detaching ourselves from the interface we open ourselves to importing Unicode versions from this side of the century. I mean, if you're really concerned about the API we could, theoretically, take |
I considered this, but came to the same conclusion. It's just not worth it. There's just no compelling reason to jump through hoops to try and preserve this API. And if we're never going to use this dead functionality, then it makes sense to remove it. Alright, I'm convinced let's go ahead and drop it. As for dropping the |
c06379a
to
b49a17e
Compare
Rebased |
8-day bump :0 |
Rebased |
1-month-2-week bump |
It would be nice if this can be rebased and then merged before it's then outdated again :-) |
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
And slide U8_UNICODE_500 forward. This halves u8_textprep_data.h: 35376 lines -> 17802 1477745 bytes -> 743357 With a theoretical (no-alignment) .rodata reduction of 150978 bytes Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
This yields another 10.6% u8_t_data.h reduction: 17775 lines -> 15885 743125 bytes -> 663942 And (assuming no alignment) frees another 16671 .rodata bytes Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
949f0fc
to
5f9b785
Compare
Rebased |
I rebased this pull request on my repo. It's only one small conflict. The interface of these: And I think that illumos-gate also doesn't depend on this code here... within OpenZFS... |
Talking with Brian we are not sure we'd like to diverge from original code. We don't know if that may ever be updated, we might check if there were any updates already, but if there were, then any local changes would make any future merges problematic. PS: It seems this code is mostly in sync with illumos, except few minor local changes. |
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 would appreciate this kind of reduction would it just be done with a limited number of ifdefs. If somebody wants to try it -- please. But I don't think divergence from Solaris/Illumos in both code and especially API worth saving 160KB these days.
Closing as superseded. |
Motivation and Context
774 .rodata bytes from dropping
uconv.c
(but dunno if that actually gets pulled in since it's unused entirely), and:in
u8_textprop_data.h
(assuming no alignment, which is mostly fair I think).The default git differ absolutely chokes on this (it gave me +17k -24k for the first big commit). I recommend explicitly picking patience. And GitHub seems to use the same one. The true diffstat for this is:
How Has This Been Tested?
Builds.
Types of changes
Checklist:
Signed-off-by
.