Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4440996pxv; Tue, 20 Jul 2021 03:59:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwn17IFsozfO1w4PFWKAXd4/Kmzj1Aggaxhkmuw1pUsJbwtlbk+YVu0E5iy1Hf2zR7hhkMg X-Received: by 2002:a17:907:207b:: with SMTP id qp27mr32222239ejb.258.1626778782621; Tue, 20 Jul 2021 03:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626778782; cv=none; d=google.com; s=arc-20160816; b=SV7OrKoXynoBIxV6uPKR7Rhbke5kZpDZRWM1mm1ddDd27u8igUoHKH5n149FmlqmBF hURPr1KEiNv4BXME14QZldHvE/agm0twGBvIMnS+d+QTmiOGO6gIonPVVmGpPf6Ehuq/ iAq0/SsfY4k05m0tocwdg7AFangAPr6rmJF/sXbg0Dm849TA9vnKgE6pamN1iR35wj4g DkFunaEUfarPtmEONlWK9JoVGBBhBMCM9Fd2/9S2aC6R/0cDuXmLE9c7xdqL5cro5adq LmUMhqMpMQIlxzAc1r1ha1ICfmVroZfUrL2xtkn0pFE7U/H3z6NbuKf2R+rW37iJVw/x /rCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oFsOPyfgFMSNeej7gOzcYG+2dt9yfnvOwKnEGw+7aJE=; b=055/hLAJjWyx4/KBpzVbCOK1RYEsrqE16GH15p0eXBKSSdyldpdsViG3pe7R5y5rK5 7NeY3JP6UgbmnIN6un/rVpN9r0QU5LqSKh1AMveyjfVTj9NjcZ+GKM4bC6Bk3DIUYIw2 ktA3R3KPKKfdVw3U0NZD+Mfe58hn0Bll8/pvlvaZybiNWAcIKAABOGwVZwozSbit/46U qM8FCt3DoUzjqUImMqjptkR/5NmXPP/ErF/50RCnr4TFkL0didtbUf78R7tgd0XF3b+P jhwlWUClYO4vi3TrHvKMpzgzGmuCEFJ4r+e5nQ2OjxGb0i5iFtHkIAAag0aYxcAtmmtY HYgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KVApPeMH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si23291584ejc.105.2021.07.20.03.59.15; Tue, 20 Jul 2021 03:59:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KVApPeMH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237657AbhGTKOD (ORCPT + 99 others); Tue, 20 Jul 2021 06:14:03 -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-kernel@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