From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B781C432BE for ; Fri, 6 Aug 2021 13:48:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F61A606A5 for ; Fri, 6 Aug 2021 13:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbhHFNs4 (ORCPT ); Fri, 6 Aug 2021 09:48:56 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:40696 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229581AbhHFNsy (ORCPT ); Fri, 6 Aug 2021 09:48:54 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mC0BA-007dWz-9R; Fri, 06 Aug 2021 13:46:28 +0000 Date: Fri, 6 Aug 2021 13:46:28 +0000 From: Al Viro To: Pavel Begunkov Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: optimise generic_write_check_limits() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 06, 2021 at 12:22:10PM +0100, Pavel Begunkov wrote: > Even though ->s_maxbytes is used by generic_write_check_limits() only in > case of O_LARGEFILE, the value is loaded unconditionally, which is heavy > and takes 4 indirect loads. Optimise it by not touching ->s_maxbytes, > if it's not going to be used. Out of curiosity - how much of improvement have you actually seen on that? I can't say I hate the patch, but I'd like to see the data...