From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f66.google.com ([74.125.83.66]:33601 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755793AbdCMBAc (ORCPT ); Sun, 12 Mar 2017 21:00:32 -0400 Date: Sun, 12 Mar 2017 18:00:28 -0700 From: Eric Biggers To: David Howells Cc: linux-fsdevel@vger.kernel.org, Al Viro , linux-kernel@vger.kernel.org, Eric Biggers Subject: Re: [PATCH v3] statx: optimize copy of struct statx to userspace Message-ID: <20170313010028.GA29728@zzz> References: <20170312062941.862-1-ebiggers3@gmail.com> <17226.1489309913@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17226.1489309913@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi David, On Sun, Mar 12, 2017 at 09:11:53AM +0000, 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 statx_set_result(&stat, buffer); > > + > > + return cp_statx(&stat, buffer); > > Can you leave it as statx_set_result rather than renaming it to cp_statx? > > David I agree with using 'noinline'. But I think the name "cp_statx()" is better because it's consistent with the existing functions in the file: cp_old_stat() cp_new_stat() cp_new_stat64() - Eric