Re: [PATCH] btrfs: Keep one more workspace around

2017-06-29 Thread Omar Sandoval
On Thu, Jun 29, 2017 at 10:57:26AM -0700, Nick Terrell wrote: > find_workspace() allocates up to num_online_cpus() + 1 workspaces. > free_workspace() will only keep num_online_cpus() workspaces. When > (de)compressing we will allocate num_online_cpus() + 1 workspaces, then > free one, and repeat.

Re: [PATCH] btrfs: Keep one more workspace around

2017-06-29 Thread Adam Borowski
On Thu, Jun 29, 2017 at 10:57:26AM -0700, Nick Terrell wrote: > The time it took to execute cp vmlinux /mnt/btrfs && sync > dropped from 1.70s to 1.44s with lzo compression, and from 2.04s to 1.80s > for zstd compression. > - if (*free_ws < num_online_cpus()) { > + if (*free_ws <=

[PATCH] btrfs: Keep one more workspace around

2017-06-29 Thread Nick Terrell
find_workspace() allocates up to num_online_cpus() + 1 workspaces. free_workspace() will only keep num_online_cpus() workspaces. When (de)compressing we will allocate num_online_cpus() + 1 workspaces, then free one, and repeat. Instead, we can just keep num_online_cpus() + 1 workspaces around, and

Re: [PATCH] btrfs: Keep one more workspace around

2017-06-29 Thread David Sterba
On Wed, Jun 28, 2017 at 08:01:51PM -0700, Nick Terrell wrote: > > Is there a version I should be testing? > > Not yet, I'm working on v2 of the patch set, which will be ready soon. > > > I got a bunch of those: > > [10170.448783] kworker/u8:6: page allocation stalls for 60720ms, order:0, > >

[PATCH] btrfs: Keep one more workspace around

2017-06-28 Thread Nick Terrell
> Is there a version I should be testing? Not yet, I'm working on v2 of the patch set, which will be ready soon. > I got a bunch of those: > [10170.448783] kworker/u8:6: page allocation stalls for 60720ms, order:0, > mode:0x14000c2(GFP_KERNEL|__GFP_HIGHMEM), nodemask=(null) > [10170.448819]