Re: [PATCH] ext4: change the type of ext4 cache stats to percpu_counter to improve performance

2019-08-26 Thread Shaokun Zhang
Hi Theodore, On 2019/8/26 23:57, Theodore Y. Ts'o wrote: > On Mon, Aug 26, 2019 at 04:24:20PM +0800, Shaokun Zhang wrote: >>> The other problem with this patch is that it initializes >>> es_stats_cache_hits and es_stats_cache_miesses too late. They will >>> get used when the journal inode is

Re: [PATCH] ext4: change the type of ext4 cache stats to percpu_counter to improve performance

2019-08-26 Thread Theodore Y. Ts'o
On Mon, Aug 26, 2019 at 04:24:20PM +0800, Shaokun Zhang wrote: > > The other problem with this patch is that it initializes > > es_stats_cache_hits and es_stats_cache_miesses too late. They will > > get used when the journal inode is loaded. This is mostly harmless, > > I have checked it again,

Re: [PATCH] ext4: change the type of ext4 cache stats to percpu_counter to improve performance

2019-08-26 Thread Shaokun Zhang
Hi Ted, On 2019/8/26 8:47, Theodore Y. Ts'o wrote: > On Sun, Aug 25, 2019 at 10:28:03AM -0700, Eric Biggers wrote: >> This patch is causing the following. Probably because there's no calls to >> percpu_counter_destroy() for the new counters? > > Yeah, I noticed this from my test runs last night

Re: [PATCH] ext4: change the type of ext4 cache stats to percpu_counter to improve performance

2019-08-26 Thread Shaokun Zhang
Hi Eric, On 2019/8/26 1:28, Eric Biggers wrote: > On Sat, Aug 24, 2019 at 11:25:24PM -0400, Theodore Y. Ts'o wrote: >> On Fri, Aug 23, 2019 at 10:47:34AM +0800, Shaokun Zhang wrote: >>> From: Yang Guo >>> >>> @es_stats_cache_hits and @es_stats_cache_misses are accessed frequently in >>>

Re: [PATCH] ext4: change the type of ext4 cache stats to percpu_counter to improve performance

2019-08-25 Thread Theodore Y. Ts'o
On Sun, Aug 25, 2019 at 10:28:03AM -0700, Eric Biggers wrote: > This patch is causing the following. Probably because there's no calls to > percpu_counter_destroy() for the new counters? Yeah, I noticed this from my test runs last night as well. It looks like original patch was never tested

Re: [PATCH] ext4: change the type of ext4 cache stats to percpu_counter to improve performance

2019-08-25 Thread Eric Biggers
On Sat, Aug 24, 2019 at 11:25:24PM -0400, Theodore Y. Ts'o wrote: > On Fri, Aug 23, 2019 at 10:47:34AM +0800, Shaokun Zhang wrote: > > From: Yang Guo > > > > @es_stats_cache_hits and @es_stats_cache_misses are accessed frequently in > > ext4_es_lookup_extent function, it would influence the ext4

Re: [PATCH] ext4: change the type of ext4 cache stats to percpu_counter to improve performance

2019-08-24 Thread Theodore Y. Ts'o
On Fri, Aug 23, 2019 at 10:47:34AM +0800, Shaokun Zhang wrote: > From: Yang Guo > > @es_stats_cache_hits and @es_stats_cache_misses are accessed frequently in > ext4_es_lookup_extent function, it would influence the ext4 read/write > performance in NUMA system. > Let's optimize it using

[PATCH] ext4: change the type of ext4 cache stats to percpu_counter to improve performance

2019-08-22 Thread Shaokun Zhang
From: Yang Guo @es_stats_cache_hits and @es_stats_cache_misses are accessed frequently in ext4_es_lookup_extent function, it would influence the ext4 read/write performance in NUMA system. Let's optimize it using percpu_counter, it is profitable for the performance. The test command is as