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=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 02054C07E9B for ; Tue, 20 Jul 2021 10:46:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E4FDA6120C for ; Tue, 20 Jul 2021 10:46:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237652AbhGTKFg (ORCPT ); Tue, 20 Jul 2021 06:05:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:34988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237617AbhGTKEO (ORCPT ); Tue, 20 Jul 2021 06:04:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A91A761208; Tue, 20 Jul 2021 10:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626777890; bh=X130X0YVgUCYc69QG5qiLAvITmmN1lXsCRtssf0iGfw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KVApPeMHeRy15Lpbb+D5SHate6j2Rxr3yKHupmiwwCGPpsZL3itxKvpcfjZUQHl42 6iPOZSLA2oJN7wc3w4y8uRYv9VyCb5U+cISizGj61SvpPYRCrKf7tL29zgJbZVen5e Y1WPacVJrk+/vE2m6+54kEuIDmZ8w/ADZSNWx0rb64v4f/gpxMMV8oo4zsKPxA+xdn pYLIQSwfTK28T3cTL/AnjowJ0FTCkq2Jh9QGS5/1eGoOTgpM/E+R9H+sYjt8flell5 EyEQ6WmYfvic28PHXSlDcy1QZ9LJ3hSPeyhBLs4E6Eoju13bp/H3+4Q+VVnwsAFyed cGF6MXcoeZ9HA== Date: Tue, 20 Jul 2021 13:44:42 +0300 From: Mike Rapoport To: "Matthew Wilcox (Oracle)" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Jeff Layton , "Kirill A . Shutemov" , Vlastimil Babka , William Kucharski , David Howells Subject: Re: [PATCH v14 018/138] mm/filemap: Add folio_lock() Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-19-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715033704.692967-19-willy@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Jul 15, 2021 at 04:35:04AM +0100, Matthew Wilcox (Oracle) wrote: > This is like lock_page() but for use by callers who know they have a folio. > Convert __lock_page() to be __folio_lock(). This saves one call to > compound_head() per contended call to lock_page(). > > Saves 455 bytes of text; mostly from improved register allocation and > inlining decisions. __folio_lock is 59 bytes while __lock_page was 79. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Christoph Hellwig > Acked-by: Jeff Layton > Acked-by: Kirill A. Shutemov > Acked-by: Vlastimil Babka > Reviewed-by: William Kucharski > Reviewed-by: David Howells > --- > include/linux/pagemap.h | 24 +++++++++++++++++++----- > mm/filemap.c | 29 +++++++++++++++-------------- > 2 files changed, 34 insertions(+), 19 deletions(-) Acked-by: Mike Rapoport