Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4434805pxv; Tue, 20 Jul 2021 03:49:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZy408GwhvWJtBn0iqF6xg19KaGQECK2fNGdkDDqZAVmAqjs7/bb/oEv8J1WPnk1YBaTby X-Received: by 2002:a05:6602:3155:: with SMTP id m21mr22126467ioy.145.1626778148768; Tue, 20 Jul 2021 03:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626778148; cv=none; d=google.com; s=arc-20160816; b=oS1+H7gbF/o7RaM/VMAHc1wZuWaPpS4d3VPmeKbAvkGBihXky5w6nvEfFva1KVjJiV jjW1lFPlkyn9AqfIrX8ma9XGz7jPU388UO1zV2npoXXDqDGP8z75zT1R3sEetm+OUYQo EHfzCqxM+34ve0Mpfud5Ki1FG7nirIehplzx4sRtgjRPKLWjRbDerpDD7Wn15ytOWJES v+HuRl/NZ0aaOiR8aBape3PpCF+nJldg/2ybh/ttR/98VpX6GS4XEjo242SeZQV3NGq4 7mWX7ZbdomFwlzg8VMSkPT60jTRLbWw1DWqYB+eiFOTM1n2ae+16UZhYcJGv0ccIQvnk EDJQ== 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=wkxn/dk8ceFbTbJEAiMMPHMKoFR0EN93WQUz+7zk3Xk=; b=RAg/nFUkEneEZtetC0pR+1D2tlcbCB7j0qNEJAuWTlrMKrH8DyYuu+1vyYNsJyMsyn JClJBIg5SKVMCrpl1+R49pC412FX6Essl94OVdZ99nj8l4OWuTdeTocpreXufjv05wfm nP/itjyUp8Q/L3V/ooXV22AwJEHVFxoylZ1z4Pc75D1q0KBGWp8u6NYGxgoCOGKDP8Xu 8eNAAh89vxEZ2rEbXuusUBnWR3LW4Oxeppiq9XiWjniiuV3UCfyWSmGUZtE+QGst2hWX 5MCqsQ7LUgm4bFXxxZfBRTRgafJEL3Wrxzq/ID23unEURKBat4Lh1axeeS82ycPyOMS5 bSjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LVJSPLXf; 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 f6si23053333jas.104.2021.07.20.03.48.58; Tue, 20 Jul 2021 03:49:08 -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=LVJSPLXf; 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 S237649AbhGTKHY (ORCPT + 99 others); Tue, 20 Jul 2021 06:07:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:34280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237540AbhGTKCC (ORCPT ); Tue, 20 Jul 2021 06:02:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E4BA361165; Tue, 20 Jul 2021 10:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626777759; bh=YQE7P7lLZR07h6/dfoxegMJc7T4H7tBElA2h22TtAZY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LVJSPLXfpMKKlvvUdM4PhX0CswRtMmdEoVcUrZ+AsHkuNuEYeIZ1A6kXx4f5AWyr6 5eG+3xt2Bm7qrjY0HZZVQ2naR/XkUnKuRAsPCkNleW5G91V/nh9zts2TTEzBoEawFB MwJIbzahzr7AQKpqlibg487dKNgpKmsG0IyarQ0OBGf4u57VTvIxv1aLbnUWQXhpJL R2+OllOStYHimMW5a+NjypHW/tjnYHUK8uIl4aTROzzfTpoA88Vwwrirb5WvkimfRF Qwszl19dveDmIm0GtJ2FTydzr2gnoGy75GpubZIPOhIz8wSne0xFqDOmA/02KjVGXs 2nDaV35hcOfUw== Date: Tue, 20 Jul 2021 13:42:32 +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" , William Kucharski , David Howells Subject: Re: [PATCH v14 017/138] mm/filemap: Add folio_unlock() Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-18-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715033704.692967-18-willy@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 04:35:03AM +0100, Matthew Wilcox (Oracle) wrote: > Convert unlock_page() to call folio_unlock(). By using a folio we > avoid a call to compound_head(). This shortens the function from 39 > bytes to 25 and removes 4 instructions on x86-64. Because we still > have unlock_page(), it's a net increase of 16 bytes of text for the > kernel as a whole, but any path that uses folio_unlock() will execute > 4 fewer instructions. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Christoph Hellwig > Acked-by: Jeff Layton > Acked-by: Kirill A. Shutemov > Reviewed-by: William Kucharski > Reviewed-by: David Howells > --- > include/linux/pagemap.h | 3 ++- > mm/filemap.c | 29 ++++++++++++----------------- > mm/folio-compat.c | 6 ++++++ > 3 files changed, 20 insertions(+), 18 deletions(-) Acked-by: Mike Rapoport