lkml.org 
[lkml]   [2004]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: stat very inefficient
From
Date
"David S. Miller" <davem@redhat.com> writes:

> 1) From inode to "struct kstat"
> 2) From "struct kstat" to "struct stat{,64}" on local kernel stack
> 3) From local kernel stack to userspace

[...]

> I was about to make sparc64 specific copies of all the stat
> system calls in order to optimize this properly. But that
> makes little sense, instead I think fs/stat.c should call
> upon arch-specific stat{,64} structure fillin routines that
> can do the magic, given a kstat struct.

I think wrappers are preferable to callbacks. Basically step (2)
should be eliminated.

Most architectures can use a generic wrapper for that, together
with a standard macro that clears all the padding in user space.

-Andi


-
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 14:04    [W:0.057 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site