All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: kernel test robot <oliver.sang@intel.com>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
	linux-fsdevel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>,
	linux-doc@vger.kernel.org, ying.huang@intel.com,
	feng.tang@intel.com, fengwei.yin@intel.com
Subject: Re: [viro-vfs:work.dcache2] [__dentry_kill()]  1b738f196e: stress-ng.sysinfo.ops_per_sec -27.2% regression
Date: Thu, 30 Nov 2023 07:55:35 +0000	[thread overview]
Message-ID: <20231130075535.GN38156@ZenIV> (raw)
In-Reply-To: <202311300906.1f989fa8-oliver.sang@intel.com>

On Thu, Nov 30, 2023 at 12:54:01PM +0800, kernel test robot wrote:

> The kernel config and materials to reproduce are available at:
> https://download.01.org/0day-ci/archive/20231130/202311300906.1f989fa8-oliver.sang@intel.com
> 
> =========================================================================================
> class/compiler/cpufreq_governor/disk/fs/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime:
>   os/gcc-12/performance/1HDD/ext4/x86_64-rhel-8.3/10%/debian-11.1-x86_64-20220510.cgz/lkp-icl-2sp7/sysinfo/stress-ng/60s
> 
> commit: 
>   e3640d37d0 ("d_prune_aliases(): use a shrink list")
>   1b738f196e ("__dentry_kill(): new locking scheme")

Very interesting...  Out of curiosity, what effect would the following
have on top of 1b738f196e?

diff --git a/fs/dcache.c b/fs/dcache.c
index b212a65ed190..d4a95e690771 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1053,16 +1053,14 @@ void d_prune_aliases(struct inode *inode)
 }
 EXPORT_SYMBOL(d_prune_aliases);
 
-static inline void shrink_kill(struct dentry *victim)
+static inline void shrink_kill(struct dentry *victim, struct list_head *list)
 {
-	do {
-		rcu_read_unlock();
-		victim = __dentry_kill(victim);
-		rcu_read_lock();
-	} while (victim && lock_for_kill(victim));
 	rcu_read_unlock();
-	if (victim)
+	victim = __dentry_kill(victim);
+	if (victim) {
+		to_shrink_list(victim, list);
 		spin_unlock(&victim->d_lock);
+	}
 }
 
 void shrink_dentry_list(struct list_head *list)
@@ -1084,7 +1082,7 @@ void shrink_dentry_list(struct list_head *list)
 			continue;
 		}
 		d_shrink_del(dentry);
-		shrink_kill(dentry);
+		shrink_kill(dentry, list);
 	}
 }
 
@@ -1514,7 +1512,7 @@ void shrink_dcache_parent(struct dentry *parent)
 				spin_unlock(&data.victim->d_lock);
 				rcu_read_unlock();
 			} else {
-				shrink_kill(data.victim);
+				shrink_kill(data.victim, &data.dispose);
 			}
 		}
 		if (!list_empty(&data.dispose))

  reply	other threads:[~2023-11-30  7:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30  4:54 [viro-vfs:work.dcache2] [__dentry_kill()] 1b738f196e: stress-ng.sysinfo.ops_per_sec -27.2% regression kernel test robot
2023-11-30  7:55 ` Al Viro [this message]
2023-12-01  2:13   ` Oliver Sang
2023-12-01  2:42     ` Oliver Sang
2023-12-01  4:09     ` Al Viro
2023-12-01  6:56       ` Al Viro
2023-12-01 20:04         ` Al Viro
2023-12-04 13:37           ` Oliver Sang
2023-12-04 19:53             ` Al Viro
2023-12-06  2:40               ` Oliver Sang
2023-12-06  5:49                 ` Al Viro
2023-12-06 14:56                   ` Oliver Sang
2023-12-06 16:15                     ` Al Viro
2023-12-06 16:30                       ` Mateusz Guzik
2023-12-06 16:42                         ` Mateusz Guzik
2023-12-06 17:09                           ` Al Viro
2023-12-06 17:24                             ` Mateusz Guzik
2023-12-06 18:30                               ` Mateusz Guzik
2023-12-07  2:29                                 ` Oliver Sang
2023-12-08 18:07                                   ` Mateusz Guzik
2023-12-06 21:07                               ` Al Viro
2023-12-06 21:41                                 ` Mateusz Guzik
2023-12-06 16:45                         ` Al Viro
2023-12-06 16:52                           ` Mateusz Guzik

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=20231130075535.GN38156@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=feng.tang@intel.com \
    --cc=fengwei.yin@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=ying.huang@intel.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.