Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp77118pxy; Tue, 4 May 2021 19:01:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3a7QVyAgCwNapm5oOsHoFWEeLRWCe/I9/Qcp08DsR7ohnAQ6PjKrxSVryUATDHpvML0mj X-Received: by 2002:a05:6402:17d7:: with SMTP id s23mr29595944edy.66.1620180072679; Tue, 04 May 2021 19:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620180072; cv=none; d=google.com; s=arc-20160816; b=hZS0EDeiA6eCsn8TE6rP/cSR57zRshrCSSrq04SBzb4tJxF6Dr4f9FNuH0jTNS1o+L l2kpP8Aa/5AzSIiDa4uEe6dqXPqDAOEyyQaP4NpepzovnDO3TRkry33ko1so2EJXjWmM rLsxaxVMdVFZgzWxvB0uaIxBLUp5Sz21BB2e8gXwgzWbJecZe0I5JNdTx2xv1UK7leP/ XsnI87gcqeLbTvAP6MUBWCJQRgEpgZYnmaSWj/mG1gJKgaFLpo5GhOxDDHmxzuAX7Q83 /cruy9RGXNIf18l8f9ot+e3QtkqeogP+NuTsj7wBtaSwDNSWAaVWHH0giBjH66njYxIi LfKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=wqdA+cSVSbdoUnh/ZYwMHMr7Xc0skZhj3LP5mAlyLyQ=; b=jJtoxtTc8Jm4Rh6tRN7fHFnEipAybuEXOGTHsXu3mHJbITpm9Rvkb9w1aZ4wzx69Rr yhtWvy3XcDtALDBXaKah/C2AO5yHH7LyUBOnf7p7tRoXuNaMLiV/J8VKBFtYqRDE9oqR H2GuZyCPrnEKeV0QZJ2XKxl+p1uw4DG/9cbI1Uv0CZuGf7xMD4WAfCFjPzvBgx2OIeHP XL4ZyHl2zHRH4ZDrzYmmzXMvCwFI/dSFTPdNnru8SJAqRVpRlsmJbg21hZytwjmKTTNy XdtWQUS3eDtguW8HvPLgcBSNdzixmSI7Vj2tzMOQt4NzsidJdN2pF/MbpPaoKEIQAOt0 V6zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l17si3654697edw.46.2021.05.04.19.00.49; Tue, 04 May 2021 19:01:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231502AbhEEA4s (ORCPT + 99 others); Tue, 4 May 2021 20:56:48 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:34341 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229586AbhEEA4r (ORCPT ); Tue, 4 May 2021 20:56:47 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 1450tcRo016413 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 4 May 2021 20:55:38 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 3A57A15C3C43; Tue, 4 May 2021 20:55:38 -0400 (EDT) Date: Tue, 4 May 2021 20:55:38 -0400 From: "Theodore Ts'o" To: Greg Stark Cc: "Maciej W. Rozycki" , Linus Torvalds , Tom Stellard , Nick Desaulniers , Masahiro Yamada , Nathan Chancellor , Linux Kernel Mailing List , clang-built-linux , Fangrui Song , Serge Guelton , Sylvestre Ledru Subject: Re: Very slow clang kernel config .. Message-ID: References: <1c5e05fa-a246-9456-ff4e-287960acb18c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 04, 2021 at 07:04:56PM -0400, Greg Stark wrote: > On Mon, 3 May 2021 at 10:39, Theodore Ts'o wrote: > > > > That was because memory was *incredibly* restrictive in those days. > > My first Linux server had one gig of memory, and so shared libraries > > provided a huge performance boost --- because otherwise systems would > > be swapping or paging their brains out. > > (I assume you mean 1 megabyte?) > I have 16G and the way modern programs are written I'm still having > trouble avoiding swap thrashing... I corrected myself in a follow-on message; I had 16 megabytes of memory, which was generous at the time. But it was still restrictive enough that it made sense to have shared libraries for C library, X Windows, etc. > This is always a foolish argument though. Regardless of the amount of > resources available we always want to use it as efficiently as > possible. The question is not whether we have more memory today than > before, but whether the time and power saved in reducing memory usage > (and memory bandwidth usage) is more or less than other resource costs > being traded off and whether that balance has changed. It's always about engineering tradeoffs. We're always trading off available CPU, memory, storage device speeds --- and also programmer time and complexity. For example, C++ and stable ABI's really don't go well together. So if you are using a large number of C++ libraries, the ability to maintain stable ABI's is ***much*** more difficult. This was well understood decades ago --- there was an Ottawa Linux Symposium presentation that discussed this in the context of KDE two decades ago. I'll also note that technology can also play a huge role here. Debian for example is now much more capable of rebuilding all packages from source with autobuilders. In addition, most desktops have easy access to high speed network links, and are set up auto-update packages. In that case, the argument that distributions have to have shared libraries because otherwise it's too hard to rebuild all of the binaries that statically linked against a shared library with a security fix becomes much less compelling. It should be pretty simple to set up a system where after a library gets a security update, the distribution could automatically figure out which packages needs to be automatically rebuilt, and rebuild them all. > > However, these days, many if not most developers aren't capable of the > > discpline needed to maintained the ABI stability needed for shared > > libraries to work well. > > I would argue you have cause and effect reversed here. The reason > developers don't understand ABI (or even API) compatibility is > *because* they're used to people just static linking (or vendoring). > If people pushed back the world would be a better place. I'd argue is just that many upstream developers just don't *care*. The incentives of an upstream developer and the distribution maintainers are quite different. ABI compatibility doesn't bring much benefits to upstream developers, and when you have a separation of concerns between package maintenance and upstream development, it's pretty inevitable. I wear both hats for e2fsprogs as the upstream maintainer as well as the Debian maintainer for that package, and I can definitely see the differences in the points of view of those two roles. Cheers, - Ted