[RFC][PATCH 11/11] optimize c/r check in dup_fd()

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

 



__scan_files_for_cr() should compile down to nothing
if checkpoint/restart is disabled.

But, I think the spinlocks in fcheck_files() keep
the compiler from figuring this out.  So, instead
if putting in some #ifdefs, use our new cr_enabled()
helper.

I've verified that this puts .text size back to
where it was without the __scan_files_for_cr() call.

Signed-off-by: Dave Hansen <dave@xxxxxxxxxxxxxxxxxx>
---

 linux-2.6.git-dave/fs/file.c |    3 +++
 1 file changed, 3 insertions(+)

diff -puN fs/file.c~optimize-cr-checkk fs/file.c
--- linux-2.6.git/fs/file.c~optimize-cr-checkk	2009-03-05 08:37:05.000000000 -0800
+++ linux-2.6.git-dave/fs/file.c	2009-03-05 08:37:05.000000000 -0800
@@ -290,6 +290,9 @@ static void __scan_files_for_cr(struct f
 {
 	int i;
 
+	if (!cr_enabled())
+		return;
+
 	for (i = 0; i < files->fdtab.max_fds; i++) {
 		struct file *f = fcheck_files(files, i);
 		if (!f)
_
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux