All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Timofey Titovets <nefelim4ag@gmail.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [RFC PATCH v4 2/2] Btrfs: add heuristic method for make decision compress or not compress
Date: Tue, 4 Jul 2017 17:25:41 +0200	[thread overview]
Message-ID: <20170704152541.GD2866@suse.cz> (raw)
In-Reply-To: <CAGqmi74FqgHzshWZti06NBp2xYjjE0reao4AqCM6vMfz4Q-qEg@mail.gmail.com>

On Tue, Jul 04, 2017 at 02:11:10PM +0300, Timofey Titovets wrote:
> >> @@ -0,0 +1,336 @@
> >> +enum compression_advice btrfs_compress_heuristic(struct inode *inode,
> >
> > This returns enum but the caller treats it as a bool, this should be
> > synced up.
> >
> 
> I think for now, enum and values can be just dropped,
> because it's only a proof of concept that in future, heuristic
> can return more complex answer and then some of that values
> can be used as acceptable for zlib and unnacceptable for lzo & etc.
> Also that can be easy added again later.

Right.

> > As mentioned in the previous mail, we'll add the skeleton code only for
> > now, which means this loop, that simply calls find_get_page, kunmap and
> > put_page.
> >
> 
> So, i will send a separate patch for skeleton code.
> And if i understood all correctly, later, we'll add complex code one by one.

Yes.

> >> +
> >> +enum compression_advice {
> >> +     COMPRESS_NONE,
> >> +     COMPRESS_COST_UNKNOWN,
> >> +     COMPRESS_COST_EASY,
> >> +     COMPRESS_COST_MEDIUM,
> >> +     COMPRESS_COST_HARD
> >
> > I don't find the naming good, as the cost is not easy or hard, but
> > rather low/medium/high. Or you can rename the whole prefix if you find a
> > better naming scheme.
> 
> (Explain above)
> So just drop that for now.

Ok.

  reply	other threads:[~2017-07-04 15:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-01 16:56 [RFC PATCH v4 0/2] Btrfs: add compression heuristic Timofey Titovets
2017-07-01 16:56 ` [RFC PATCH v4 1/2] Btrfs: add precomputed log2() Timofey Titovets
2017-07-01 16:56 ` [RFC PATCH v4 2/2] Btrfs: add heuristic method for make decision compress or not compress Timofey Titovets
2017-07-03 17:30   ` David Sterba
2017-07-04 11:11     ` Timofey Titovets
2017-07-04 15:25       ` David Sterba [this message]
2017-07-03 17:09 ` [RFC PATCH v4 0/2] Btrfs: add compression heuristic David Sterba

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=20170704152541.GD2866@suse.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nefelim4ag@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.