Quantcast

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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
Hi folks,

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?

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
On Fri, May 05, 2017 at 11:42:55AM -0700, Richard Sharpe via samba-technical wrote:

> Hi folks,
>
> 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?

Maybe, ping me again at work next week !

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
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).

-slow

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Samba - samba-technical mailing list
On Sat, May 6, 2017 at 11:27 PM, Ralph Böhme <[hidden email]> 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
(何以解憂?唯有杜康。--曹操)

Loading...