Re: [PATCH v3] statx: optimize copy of struct statx to userspace

2017-03-12 Thread Eric Biggers
Hi David, On Sun, Mar 12, 2017 at 09:11:53AM +, David Howells wrote: > Eric Biggers wrote: > > > +static int cp_statx(const struct kstat *stat, struct statx __user *buffer) > > ... > > + struct statx tmp; > > This function needs to be "noinline" as tmp is big. > > >

Re: [PATCH v3] statx: optimize copy of struct statx to userspace

2017-03-12 Thread Eric Biggers
Hi David, On Sun, Mar 12, 2017 at 09:11:53AM +, David Howells wrote: > Eric Biggers wrote: > > > +static int cp_statx(const struct kstat *stat, struct statx __user *buffer) > > ... > > + struct statx tmp; > > This function needs to be "noinline" as tmp is big. > > > - return

Re: [PATCH v3] statx: optimize copy of struct statx to userspace

2017-03-12 Thread David Howells
Eric Biggers wrote: > +static int cp_statx(const struct kstat *stat, struct statx __user *buffer) > ... > + struct statx tmp; This function needs to be "noinline" as tmp is big. > - return statx_set_result(, buffer); > + > + return cp_statx(, buffer); Can you

Re: [PATCH v3] statx: optimize copy of struct statx to userspace

2017-03-12 Thread David Howells
Eric Biggers wrote: > +static int cp_statx(const struct kstat *stat, struct statx __user *buffer) > ... > + struct statx tmp; This function needs to be "noinline" as tmp is big. > - return statx_set_result(, buffer); > + > + return cp_statx(, buffer); Can you leave it as

[PATCH v3] statx: optimize copy of struct statx to userspace

2017-03-11 Thread Eric Biggers
From: Eric Biggers I found that statx() was significantly slower than stat(). As a microbenchmark, I compared 10,000,000 invocations of fstat() on a tmpfs file to the same with statx() passed a NULL path: $ time ./stat_benchmark real0m1.464s

[PATCH v3] statx: optimize copy of struct statx to userspace

2017-03-11 Thread Eric Biggers
From: Eric Biggers I found that statx() was significantly slower than stat(). As a microbenchmark, I compared 10,000,000 invocations of fstat() on a tmpfs file to the same with statx() passed a NULL path: $ time ./stat_benchmark real0m1.464s user0m0.275s