All places where file_ntimes is called have an fsp available ...

Richard Sharpe realrichardsharpe at gmail.com
Sun May 7 14:12:14 UTC 2017


On Sat, May 6, 2017 at 11:27 PM, Ralph Böhme <slow at samba.org> wrote:
> Hi Richard
>
> On Fri, May 05, 2017 at 11:42:55AM -0700, Richard Sharpe via samba-technical wrote:
>> I see that all the paths where file_ntimes is called have an fsp
>> available, although sometimes it is NULL.
>>
>> Why can't we pass that on to file_ntimes so that in the cases where an
>> fd is available futimens could be used rather than utimensat, for
>> example.
>>
>> Might be worth some extra performance?
>
> how comes you think futimens will be noticably faster compared to utimensat?
>
> My approach would be to profile both versions with perf, see my talk on this
> stuff from last week (once the session recordings and slides are online).

I guess I figured that on a busy system the dentries along the path
might have been evicted, forcing the system to pull in inodes again
etc.

However, having just written a VFS module to handle create/birth time
and DOS attributes via NFSv4.1/2 (and some ioctls) I am also concerned
that in other places, like stat, it seems we do not pass in an FSP
even though we had it higher up the stack.

This means that in over half the functions I have to open the file,
issue the ioctl and close the file afterwards, which is bound to be a
performance hit. (3 system calls instead of one)

However, doing some profiling sounds like a good idea ...

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list