Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp7617lqk; Wed, 13 Mar 2024 14:34:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZK+Q60Tihz7vJVaHSVxA7m02lfoSQnvqXkGs//5k5nk5aP5FkmIe/HShPbG2bdK2TQZ5Lsw2GgZxHvo/i/oGyhTJbFV+wKevF46G8xA== X-Google-Smtp-Source: AGHT+IFu9oaffjnD83QpukkjELq+00yJr9X8c8Sx+2CrsozIoUlQDH+bTQTr/ziNG5rSHwHohBp2 X-Received: by 2002:a50:cbcb:0:b0:567:429f:7164 with SMTP id l11-20020a50cbcb000000b00567429f7164mr2911503edi.32.1710365687704; Wed, 13 Mar 2024 14:34:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710365687; cv=pass; d=google.com; s=arc-20160816; b=h9PPfJ5yjjhcA/dhP+WXAwvZVO6EZl/ZaWPQ2+mfnUv5CgOHB00UxjnGEbXUrv98dI AfKWZldrORngtIovlpHr9YH90SLbDtmJRs62HyFgUz6W0cccXzRxqA/8VabNqyRmAdTd G2Qjh2IasceyKRUlTi0Ow5PZSW1X8Qw9nngQpn14/WM+ni/qHh7J0Xs5PfXySm6S2O7z 4L35HK3bOdathGr6w9xVz5a2AbnBbMRSLWv+OcxWetAx8f2fvhVlE0QNANi5y5Tbd6l6 1Rasxi1m0YqbRiu96YjT/opdQo1Z+97nTQkuZHUNa+eTbD/kNzYqEEfU3HqEkDNaJIYQ xfNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=L6S/o0D2CMop6/QZVenetyqvM7me+8gNVf+Uyf/+tF8=; fh=SeWmbxeI3PX8TSWkp5ahJgmLVh9c7XoTXYYRkgln+TA=; b=Bk9dt0uW6/613v3UJSKmSE+aT+/sTu6xxnpB5O72sxTCr632xa75JdsNG4fdvA6lqo /r5IdRS/2d/ovoiv9MXgkjPFw3/aWBf+0PUTFy3iObPsdyf18HqTNIy8K12r4TF83+9V 2BhMBAkCrEZUdlnXAZ1B7ovGmKSekhbZWPGBIGOjjzGHmvzCIzC/+yRVItA1liDbnlWq jCcHW4lehHkwbafcyG1CODs0e6waYGEjLNDmPAW6Iq67HEB6JcjUZy4naBIbf9BbEpaa 5wB48vKTkfxo2a0uAt1H9AWX2VGh5s/wBeM8OJ9en7VzIU0nig70tfObh6+f3R+Ny5VQ BmmQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=fUgkPu16; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-102537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z8-20020a056402274800b00566a2f0b734si44467edd.38.2024.03.13.14.34.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 14:34:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=fUgkPu16; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-102537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6D3C11F24540 for ; Wed, 13 Mar 2024 21:34:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C92654730; Wed, 13 Mar 2024 21:34:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="fUgkPu16" Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CF0653815 for ; Wed, 13 Mar 2024 21:34:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710365676; cv=none; b=D+HAA1wuEQD9Z1dbG/3Jmsyul7Yfgx9ww5J1sC+zRJAp6iXq2LdkiLz/eAvs0phw0j7YWrytKzDqACO4Wsk6ix1PnctVrRg9xi0kDR1F29u+kwT2m4DZpwlDbkx7rXEUBRDqn8ziiX9YHoRQCMZvX3X+hsDFG5Fr/zN6DP5NzZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710365676; c=relaxed/simple; bh=78PW4X14ihC5fEleCYrPCzpp+cNooZ+uZ4kgdRyzCH4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aPpqsMxSqtB01ULvo2yygXNBjy8KDMhcAkv17xeNXnNQm/h0adDe/Fd4R+nJ55+65LcCEm/0BtVp25VAmqT6krTxt3PmdCbW5b5nJCwUtCc5S2RdX8WGtWBgsqxvp9HQxzwwf+z5cl0tFfG63oMMhx+Nt4JbLarc3dNMzl65x3A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=fUgkPu16; arc=none smtp.client-ip=95.215.58.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Wed, 13 Mar 2024 17:34:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1710365672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=L6S/o0D2CMop6/QZVenetyqvM7me+8gNVf+Uyf/+tF8=; b=fUgkPu161w2XGctM6Q8jSdDM/+AiXHZGukaq16SZsbl/Rl+X/9FPrlhzRrXR2f3fBxSD+d fnQWYZw5eZNIh6DZmY5fuBr+tIWvZ6QOYEpswJcnxDIuIboKvcHR5boJfHyZ5XE5BOGiuC u1Vv4kyf46M8x1wEbIuBj453OemYWA0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Linus Torvalds Cc: "Darrick J. Wong" , linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [GIT PULL] bcachefs updates for 6.9 Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT On Wed, Mar 13, 2024 at 01:47:59PM -0700, Linus Torvalds wrote: > On Tue, 12 Mar 2024 at 18:10, Kent Overstreet wrote: > > > > Hi Linus, few patches for you - plus a simple merge conflict with VFS > > changes: > > The conflicts are trivial. > > The "make random bcachefs code be a library function" stuff I looked > at, decided is senseless, and ended up meaning that I'm not pulling > this without a lot more explanation (and honestly, I don't think the > explanations would hold water). > > That "stdio_redirect_printf()" and darray_char stuff is just > horrendous interfaces with no explanations. The interfaces are > disgusting. It's a bidirectional pipe between a kthread and an fd. Not sure what's complicated about that? > And if you *do* make it a library thing, it needs to be > > (a) much more explained > > (b) have much saner naming, and fewer disgusting and completely > nonsensical interfaces ("DARRAY()"). DARRAY() is just a dynamic array, aka a c++ vector; we open code those so much it's _stupid_. I wouldn't be opposed to changing the name to something more standard (Rust calls it a vector too); I started out with the CCAN version and rewrote it later for hte kernel. > And no, finding one other filesystem to share this kind of code is not > sufficient to try to claim it's a sane interface and sane naming. > > But the main dealbreaker is the insane math. > > And dammit, we talked about the idiotic "mean and variance" garbage > long ago. It was wrong back then, it's *still* wrong. > > You didn't explain why it couldn't use the *much* simpler MAD (median > absolute deviation) instead of using variance. I most certainly did. I liked your MAD suggestion, but the catch was that we need an exponentially weighted version, not just the standard version, and I haven't seen an derivation of exponentially weighted MAD and doing that is a bit above my statistical pay grade. I explained all this at the time. Besides that, the existing code works fine, the u128 stuff is right out of Knuth (divide is the only even vaguely tricky one), and it's nicely self contained. It's fine. > I called it insanely over-engineered back then, and as far as I can > tell, absolutely *NOTHING* has changed apart from some slight type > name details. > > As long as you made it some kind of bcachefs-only thing, I don't mind. > > But now you're trying to push this garbage as some kind of generic > library code that others would use, and that immediately means that I > *do* mind insanely overengineered interfaces. > > The time_stats stuff otherwise looks at leask like a sane interface > with names and uses, but the use of that horrendous infrastructure > scuttles it. Well, that leaves us at a bit of an impasse then because Darrick wants this stuff for XFS (he was discovering useful stuff with it pretty much right away) and I'm just not doing a MAD conversion, sorry. I'm just being practical here, I like MAD in principle but that's too far outside my wheelhouse. Maybe we can get someone else interested? I have a feeling Peter could whip it out in about 5 minutes...