RE: scalability investigation: Where can I get your latest patches?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-08-04 at 09:06 +0100, Kleen, Andi wrote:
> > > I believe the latest version of Nick's patchkit has a likely fix for
> > that.
> > >
> > > http://git.kernel.org/?p=linux/kernel/git/npiggin/linux-
> > npiggin.git;a=commitdiff;h=9edd35f9aeafc8a5e1688b84cf4488a94898ca45
> > 
> > Thanks Andi. The patch has no ext3 part.
> 
> Good point. But perhaps the ext2 patch can be adapted. The ACL code
> should be similar in ext2 and ext3 (and 4)
I ported ext2 part to ext3. aim7 testing on Nehalem EX 4 socket machine
shows the regression disappears.

---

diff -Nraup linux-2.6.35-rc5_nick/fs/ext3/acl.c linux-2.6.35-rc5_npymz/fs/ext3/acl.c
--- linux-2.6.35-rc5_nick/fs/ext3/acl.c	2010-08-05 16:23:19.000000000 +0800
+++ linux-2.6.35-rc5_npymz/fs/ext3/acl.c	2010-08-05 15:47:38.000000000 +0800
@@ -240,13 +240,21 @@ ext3_set_acl(handle_t *handle, struct in
 }
 
 int
-ext3_check_acl(struct inode *inode, int mask)
+ext3_check_acl_rcu(struct inode *inode, int mask, unsigned int flags)
 {
-	struct posix_acl *acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
+	struct posix_acl *acl;
 
-	if (IS_ERR(acl))
-		return PTR_ERR(acl);
-	if (acl) {
+	if (flags & IPERM_FLAG_RCU) {
+		if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
+			return -ECHILD;
+		return -EAGAIN;
+	}
+
+       acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
+       if (IS_ERR(acl))
+                return PTR_ERR(acl);
+
+        if (acl) {
 		int error = posix_acl_permission(inode, acl, mask);
 		posix_acl_release(acl);
 		return error;
diff -Nraup linux-2.6.35-rc5_nick/fs/ext3/acl.h linux-2.6.35-rc5_npymz/fs/ext3/acl.h
--- linux-2.6.35-rc5_nick/fs/ext3/acl.h	2010-08-05 16:23:19.000000000 +0800
+++ linux-2.6.35-rc5_npymz/fs/ext3/acl.h	2010-08-05 15:48:51.000000000 +0800
@@ -54,7 +54,7 @@ static inline int ext3_acl_count(size_t 
 #ifdef CONFIG_EXT3_FS_POSIX_ACL
 
 /* acl.c */
-extern int ext3_check_acl (struct inode *, int);
+extern int ext3_check_acl_rcu(struct inode *inode, int mask, unsigned int flags);
 extern int ext3_acl_chmod (struct inode *);
 extern int ext3_init_acl (handle_t *, struct inode *, struct inode *);
 
diff -Nraup linux-2.6.35-rc5_nick/fs/ext3/file.c linux-2.6.35-rc5_npymz/fs/ext3/file.c
--- linux-2.6.35-rc5_nick/fs/ext3/file.c	2010-08-05 16:23:19.000000000 +0800
+++ linux-2.6.35-rc5_npymz/fs/ext3/file.c	2010-08-05 15:52:39.000000000 +0800
@@ -79,7 +79,7 @@ const struct inode_operations ext3_file_
 	.listxattr	= ext3_listxattr,
 	.removexattr	= generic_removexattr,
 #endif
-	.check_acl	= ext3_check_acl,
+	.check_acl_rcu	= ext3_check_acl_rcu,
 	.fiemap		= ext3_fiemap,
 };
 
diff -Nraup linux-2.6.35-rc5_nick/fs/ext3/namei.c linux-2.6.35-rc5_npymz/fs/ext3/namei.c
--- linux-2.6.35-rc5_nick/fs/ext3/namei.c	2010-08-05 16:25:08.000000000 +0800
+++ linux-2.6.35-rc5_npymz/fs/ext3/namei.c	2010-08-05 16:01:47.000000000 +0800
@@ -2465,7 +2465,7 @@ const struct inode_operations ext3_dir_i
 	.listxattr	= ext3_listxattr,
 	.removexattr	= generic_removexattr,
 #endif
-	.check_acl	= ext3_check_acl,
+	.check_acl_rcu	= ext3_check_acl_rcu,
 };
 
 const struct inode_operations ext3_special_inode_operations = {
@@ -2476,5 +2476,5 @@ const struct inode_operations ext3_speci
 	.listxattr	= ext3_listxattr,
 	.removexattr	= generic_removexattr,
 #endif
-	.check_acl	= ext3_check_acl,
+	.check_acl_rcu	= ext3_check_acl_rcu,
 };


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]