Skip to contentSkip to conversation

dcache_rcu [performance results]

DISCUSSION Andi Kleen 4 participants 5 messages Nov 2, 2002 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#4 lore raw
Quoted 6 lines · Dipankar Sarma

I should add that this is a general trend we see in all workloads that do a lot of open/closes and so much so that performance is very sensitive to how close to / your application's working directory is. You would get much better system time if you compile a kernel in /linux as compared to say /home/fs01/users/akpm/kernel/linux ;-)

That's interesting. Perhaps it would make sense to have a fast path that just does a string match of the to be looked up path to a cached copy of cwd and if it matches works as if cwd was the root. Would need to be careful with chroot where cwd could be outside the root and clear the cached copy in this case. Then you could avoid all the locking overhead for directories above your cwd if you stay in there.

-Andi

#5 lore raw
Quoted 8 lines · Andi Kleen
Quoted 6 lines · Dipankar Sarma

I should add that this is a general trend we see in all workloads that do a lot of open/closes and so much so that performance is very sensitive to how close to / your application's working directory is. You would get much better system time if you compile a kernel in /linux as compared to say /home/fs01/users/akpm/kernel/linux ;-)

Quoted 6 lines

That's interesting. Perhaps it would make sense to have a fast path that just does a string match of the to be looked up path to a cached copy of cwd and if it matches works as if cwd was the root. Would need to be careful with chroot where cwd could be outside the root and clear the cached copy in this case. Then you could avoid all the locking overhead for directories above your cwd if you stay in there.

Well, on second thoughts I can't see why the path length for pwd would make difference for kernel compilation - it uses relative path and for path lookup, if the first character is not '/', then lookup is done relative to current->fs->pwd. I will do some more benchmarking on and verify.

I did get inputs from Troy Wilson who does specweb measurements that the path name length of the location of the served files make a difference. I presume his webserver setup used full path names.

Thanks
Dipankar

author
#6 lore raw
Quoted 5 lines

Well, on second thoughts I can't see why the path length for pwd would make difference for kernel compilation - it uses relative path and for path lookup, if the first character is not '/', then lookup is done relative to current->fs->pwd. I will do some more benchmarking on and verify.

Kernel compilation actually uses absolute pathnames e.g. for dependency checking. TOPDIR is also specified absolutely, so an include access likely uses an absolute pathname too.

-Andi

#7 lore raw

In article <[email protected]>,

Quoted 3 lines · Andi Kleen

Kernel compilation actually uses absolute pathnames e.g. for dependency checking.

This used to be true, but it shouldn't be true any more. TOPDIR should be gone, and everything should be relative paths (and all "make" invocations should just be done from the top kernel directory).

But yes, it certainly _used_ to be true (and hey, maybe I've missed some reason for why it isn't still true).

Linus

#8 lore raw
Quoted 9 lines · Linus Torvalds
Quoted 2 lines

Kernel compilation actually uses absolute pathnames e.g. for dependency checking.

This used to be true, but it shouldn't be true any more. TOPDIR should be gone, and everything should be relative paths (and all "make" invocations should just be done from the top kernel directory).

But yes, it certainly _used_ to be true (and hey, maybe I've missed some reason for why it isn't still true).

If there is any dependency left on absolute paths thats a bug.

I have tested this by doing a full make and copy the tree. When executing make again nothing got rebuild - so it is OK for the general case.

But please report it if you see something in contradiction with that.

Sam