public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Chris Mason <clm@fb.com>,
	squashfs-devel@lists.sourceforge.net,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Nick Terrell <nickrterrell@gmail.com>, Yann Collet <cyan@fb.com>,
	Petr Malat <oss@malat.biz>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	Nick Terrell <terrelln@fb.com>,
	linux-crypto@vger.kernel.org, Kernel Team <Kernel-team@fb.com>,
	Niket Agarwal <niketa@fb.com>,
	linux-btrfs@vger.kernel.org, Johannes Weiner <jweiner@fb.com>
Subject: Re: [PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API
Date: Wed, 16 Sep 2020 11:27:42 -0700	[thread overview]
Message-ID: <20200916182742.GB4373@sol.localdomain> (raw)
In-Reply-To: <20200916144618.GB16392@infradead.org>

On Wed, Sep 16, 2020 at 03:46:18PM +0100, Christoph Hellwig wrote:
> On Wed, Sep 16, 2020 at 10:43:04AM -0400, Chris Mason wrote:
> > Otherwise we just end up with drift and kernel-specific bugs that are harder
> > to debug.  To the extent those APIs make us contort the kernel code, I???m
> > sure Nick is interested in improving things in both places.
> 
> Seriously, we do not care elsewhere.  Why would zlib be any different?
> 
> > There are probably 1000 constructive ways to have that conversation.  Please
> > choose one of those instead of being an asshole.
> 
> I think you are the asshole here by ignoring the practices we are using
> elsewhere and think your employers pet project is somehow special.  It
> is not, and claiming so is everything but constructive.
> 

The userspace Zstandard library is widely used and has been heavily reviewed,
tested, and fuzzed.

The options are either (a) write and maintain a separate kernel implementation
of Zstandard, or (b) periodically sync from upstream and make minimal, easily
reviewable changes to integrate with the kernel.

I don't see option (a) working for Zstandard.  For short and simple code, it's
the usual Linux kernel practice and it works fine.  But it's far too hard to
write and maintain a good implementation of Zstandard -- meaning correct, fast,
fully fuzzed, and supporting all needed compression levels.  Optimizing
compressors and decompressors is really hard.  A "naive" implementation wouldn't
be too hard, but it would be slow and wouldn't support high compression ratios.

Similarly, some of the crypto assembly code in the kernel is taken from the
OpenSSL project, since the kernel community doesn't have the capacity to
properly optimize algorithms like Poly1305 for x86, arm, arm64, mips, ...

If your main concern is about the camel case function naming, that doesn't seem
very important, relatively speaking.

- Eric

  parent reply	other threads:[~2020-09-16 18:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  3:42 [PATCH 0/9] Update to zstd-1.4.6 Nick Terrell
2020-09-16  3:42 ` [PATCH 1/9] lib: zstd: Add zstd compatibility wrapper Nick Terrell
2020-09-16  8:48   ` Christoph Hellwig
2020-09-16 20:21     ` Nick Terrell
2020-09-16  3:42 ` [PATCH 2/9] lib: zstd: Add decompress_sources.h for decompress_unzstd Nick Terrell
2020-09-16  3:42 ` [PATCH 4/9] crypto: zstd: Switch to zstd-1.4.6 API Nick Terrell
2020-09-16  8:49   ` Christoph Hellwig
2020-09-16  3:42 ` [PATCH 5/9] btrfs: zstd: Switch to the " Nick Terrell
2020-09-16  8:49   ` Christoph Hellwig
2020-09-16 14:20     ` Chris Mason
2020-09-16 14:30       ` Christoph Hellwig
2020-09-16 14:43         ` Chris Mason
2020-09-16 14:46           ` Christoph Hellwig
2020-09-16 15:01             ` Chris Mason
2020-09-16 18:27             ` Eric Biggers [this message]
2020-09-16 19:18             ` Nick Terrell
2020-09-17  1:35               ` Rik van Riel
2020-09-17 10:04                 ` Christoph Hellwig
2020-09-17 14:28                   ` Chris Mason
2020-09-17 17:57                     ` Nick Terrell
2020-09-16  3:43 ` [PATCH 6/9] f2fs: " Nick Terrell
2020-09-16  3:43 ` [PATCH 7/9] squashfs: " Nick Terrell
2020-09-16  3:43 ` [PATCH 8/9] lib: unzstd: " Nick Terrell
2020-09-16  3:43 ` [PATCH 9/9] lib: zstd: Remove zstd compatibility wrapper Nick Terrell
     [not found] ` <20200916034307.2092020-4-nickrterrell@gmail.com>
2020-09-16  8:01   ` [PATCH 3/9] lib: zstd: Upgrade to latest upstream zstd version 1.4.6 kernel test robot
2020-09-16 20:53   ` Nick Terrell
2020-09-16 20:53     ` Nick Terrell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200916182742.GB4373@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=Kernel-team@fb.com \
    --cc=clm@fb.com \
    --cc=cyan@fb.com \
    --cc=hch@infradead.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jweiner@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickrterrell@gmail.com \
    --cc=niketa@fb.com \
    --cc=oss@malat.biz \
    --cc=squashfs-devel@lists.sourceforge.net \
    --cc=terrelln@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox