Re: [PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-28 Thread Anand Jain
On 28/07/2017 00:36, David Sterba wrote: On Mon, Jul 24, 2017 at 11:40:17PM +0800, Anand Jain wrote: Eg. files that are already compressed would increase the cpu consumption with compress-force, while they'd be hopefully detected as incompressible with 'compress' and clever heuristics. So

Re: [PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-27 Thread David Sterba
On Mon, Jul 24, 2017 at 11:40:17PM +0800, Anand Jain wrote: > > > Eg. files that are already compressed would increase the cpu consumption > > with compress-force, while they'd be hopefully detected as > > incompressible with 'compress' and clever heuristics. So the NOCOMPRESS > > bit would

Re: [PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-24 Thread Anand Jain
Eg. files that are already compressed would increase the cpu consumption with compress-force, while they'd be hopefully detected as incompressible with 'compress' and clever heuristics. So the NOCOMPRESS bit would better reflect the status of the file. current NOCOMPRESS is based on trial

Re: [PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-24 Thread David Sterba
On Fri, Jul 21, 2017 at 11:00:27PM +0200, Adam Borowski wrote: > On Fri, Jul 21, 2017 at 11:37:49PM +0500, Roman Mamedov wrote: > > On Fri, 21 Jul 2017 13:00:56 +0800 > > Anand Jain wrote: > > > On 07/18/2017 02:30 AM, David Sterba wrote: > > > > This must stay 'return 1',

Re: [PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-21 Thread Anand Jain
On 07/22/2017 05:00 AM, Adam Borowski wrote: On Fri, Jul 21, 2017 at 11:37:49PM +0500, Roman Mamedov wrote: On Fri, 21 Jul 2017 13:00:56 +0800 Anand Jain wrote: On 07/18/2017 02:30 AM, David Sterba wrote: This must stay 'return 1', if force-compress is on, so the

Re: [PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-21 Thread Adam Borowski
On Fri, Jul 21, 2017 at 11:37:49PM +0500, Roman Mamedov wrote: > On Fri, 21 Jul 2017 13:00:56 +0800 > Anand Jain wrote: > > On 07/18/2017 02:30 AM, David Sterba wrote: > > > This must stay 'return 1', if force-compress is on, so the change is > > > reverted. > > > >

Re: [PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-21 Thread Roman Mamedov
On Fri, 21 Jul 2017 13:00:56 +0800 Anand Jain wrote: > > > On 07/18/2017 02:30 AM, David Sterba wrote: > > So it basically looks good, I could not resist and rewrote the changelog > > and comments. There's one code fix: > > > > On Mon, Jul 17, 2017 at 04:52:58PM +0300,

Re: [PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-20 Thread Anand Jain
On 07/18/2017 02:30 AM, David Sterba wrote: So it basically looks good, I could not resist and rewrote the changelog and comments. There's one code fix: On Mon, Jul 17, 2017 at 04:52:58PM +0300, Timofey Titovets wrote: -static inline int inode_need_compress(struct inode *inode) +static

Re: [PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-17 Thread David Sterba
So it basically looks good, I could not resist and rewrote the changelog and comments. There's one code fix: On Mon, Jul 17, 2017 at 04:52:58PM +0300, Timofey Titovets wrote: > -static inline int inode_need_compress(struct inode *inode) > +static inline int inode_need_compress(struct inode

[PATCH v3] Btrfs: add skeleton code for compression heuristic

2017-07-17 Thread Timofey Titovets
For now that code just return true Later more complex heuristic code will be added Signed-off-by: Timofey Titovets --- fs/btrfs/compression.c | 30 ++ fs/btrfs/compression.h | 2 ++ fs/btrfs/inode.c | 10 +- 3 files changed, 37