lkml.org 
[lkml]   [2003]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Strange performance change 59 -> 61/62
"Martin J. Bligh" <mbligh@aracnet.com> wrote:
>
> I'm comparing 59-mjb6 to 61-mjb1 and notice some strange performance
> differences that I can't explain ... not a big drop, but odd.
>...
>
> 1562 .text.lock.file_table
> 583 dentry_open
> 551 get_empty_filp

The first one here is fget(). That's causing problems on ppc64 as well - the
machine is spending as long in fget as it is in copy_foo_user() in dbench
runs.

One possibility is that we're calling fget() more often than previously,
although that would be rather odd. Can you add the below patch, and monitor
/proc/meminfo:nr_fgets?

If not that, then maybe some funny cacheline aliasing thing?


file_table.c | 2 ++
linux/page-flags.h | 1 +
page_alloc.c | 1 +
3 files changed, 4 insertions(+)

diff -puN include/linux/page-flags.h~fget-counter include/linux/page-flags.h
--- 25/include/linux/page-flags.h~fget-counter 2003-02-19 10:14:54.000000000 -0800
+++ 25-akpm/include/linux/page-flags.h 2003-02-19 10:15:26.000000000 -0800
@@ -87,6 +87,7 @@ struct page_state {
unsigned long nr_reverse_maps; /* includes PageDirect */
unsigned long nr_mapped; /* mapped into pagetables */
unsigned long nr_slab; /* In slab */
+ unsigned long nr_fgets;
#define GET_PAGE_STATE_LAST nr_slab

/*
diff -puN mm/page_alloc.c~fget-counter mm/page_alloc.c
--- 25/mm/page_alloc.c~fget-counter 2003-02-19 10:15:20.000000000 -0800
+++ 25-akpm/mm/page_alloc.c 2003-02-19 10:15:48.000000000 -0800
@@ -1439,6 +1439,7 @@ static char *vmstat_text[] = {
"nr_reverse_maps",
"nr_mapped",
"nr_slab",
+ "nr_fgets",

"pgpgin",
"pgpgout",
diff -puN fs/file_table.c~fget-counter fs/file_table.c
--- 25/fs/file_table.c~fget-counter 2003-02-19 10:15:55.000000000 -0800
+++ 25-akpm/fs/file_table.c 2003-02-19 10:16:21.000000000 -0800
@@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
+#include <linux/mm.h>
#include <linux/security.h>
#include <linux/eventpoll.h>
#include <linux/mount.h>
@@ -156,6 +157,7 @@ struct file * fget(unsigned int fd)
struct file * file;
struct files_struct *files = current->files;

+ inc_page_state(nr_fgets);
read_lock(&files->file_lock);
file = fcheck(fd);
if (file)
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.072 / U:3.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site