From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14351 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Revisiting 64-bit time_t Date: Tue, 2 Jul 2019 17:09:33 -0400 Message-ID: <20190702210933.GB1506@brightrain.aerifal.cx> References: <20190628150659.GD1506@brightrain.aerifal.cx> <3424A001-EBF1-412E-B0F4-A7E834966807@adelielinux.org> <20190629162116.GJ1506@brightrain.aerifal.cx> <20190701160744.GT1506@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="229162"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14367-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jul 02 23:09:51 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hiQ28-000xVC-Jx for gllmg-musl@m.gmane.org; Tue, 02 Jul 2019 23:09:48 +0200 Original-Received: (qmail 32159 invoked by uid 550); 2 Jul 2019 21:09:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 32140 invoked from network); 2 Jul 2019 21:09:45 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14351 Archived-At: On Tue, Jul 02, 2019 at 11:35:25AM +0200, Arnd Bergmann wrote: > On Mon, Jul 1, 2019 at 6:08 PM Rich Felker wrote: > > > > On Mon, Jul 01, 2019 at 04:41:51PM +0200, Arnd Bergmann wrote: > > > c) Keep backwards compatibility in libraries, but convert the > > > distro one package at a time. > > > Advantage: If done right, users can upgrade over rolling > > > releases without ABIs breaking > > > Disadvantage: very hard to get right, and much more work > > > than the other two. > > > > I'm confused how "convert the distro one package at a time" comes up. > > The only packages potentially affected are ones that provide or > > consume a non-libc API with time_t or derived types as inputs or > > outputs. Such providers and consumers would have to be updated in sync > > with each other, but otherwise there should be no constraints about > > updating packages. I think this could be implemented with distros' > > standard "depends on" and "conflicts with" mechanics. > > The difference to b) would be that one allows single package updates > at all, within the constraints of the distro dependency system. > Actually figuring the dependencies and documenting them is most of > the work here. > > > > unrelated reasons. Debian will probably want c), but might also > > > be convinced to replace the existing 32-bit ports with musl based > > > ones to avoid the effort and reduce RAM usage at the same > > > time ;-) > > > > Replacing libc is like the polar opposite of option (c) here... :-) > > Correct, this would basically put debian-i386 and debian-armhf into > category a), and create a new debian-musl-386 and debian-musl-armhf > that starts out with time64, and have these maintained in parallel > for as long as there is demand for both. > > One reason why this may be interesting is that it reduces the > impact on the 64-bit Debian ports, which don't have to go through > the pain of a rebuild with new package versions and dependencies > when the actual ABI never changes for them. > > It depends a bit on what approach Debian chooses for upgrading > some of the key packages, but if they determine that e.g. libcurl, > libssl, libgtk, libpng and libreadline would all need a new soname > for their library because of unfixable ABI incompatibility, *and* they > want to keep the soname the same between 32 and 64 bit at all cost, > then a new incompatible distro port can be the easier way out. > (it's clearly too early to know what it will take to rebuild 32-bit > debian fro time64, but we an think about the possible alternatives). I don't think using musl instead of glibc is a viable choice for Debian archs; there are fundamental differences in behavior that would break things for users who don't expect the change, and software that's explicitly glibc-only like systemd that they use and would have to fight with. If they want to take on these fights, I'd love it, but I wouldn't expect it to happen. > Side question for this: do you have an estimate of the potential > RAM saving when comparing glibc with musl builds of the same > software? It will be highly dependent on the software and processes running. musl makes significant gains for lots of instances of small programs, where the minimal glibc bloat will dominate the overall process size, and possibly for multithreaded processes where glibc's large default thread stacks, caching of exited threads' stacks for reuse, and malloc arenas can consume a lot of memory that's nominally not in use by the application. On the flip side, musl's malloc has fundamental problems that can waste lots of memory under high contention. This will be fixed in the next-gen malloc which I hope to start on sometime soon. Rich