Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp348925pxf; Wed, 31 Mar 2021 05:06:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8U2LilXJcmGdjCdG3fcND/vXKG2D+tWTKW6Xi4zjIPN0nW9EG0DZO9P87Ka1MUlzT7PiN X-Received: by 2002:a17:906:3b48:: with SMTP id h8mr3072762ejf.261.1617192383253; Wed, 31 Mar 2021 05:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617192383; cv=none; d=google.com; s=arc-20160816; b=bGpiUgUYFkvrWrhCWSnFgwg3C8sjSpPCO6ikzuXuTf5MaoM6GWsMO/eFp2GnPDn8sz bLekF3WoBcLx8oDi84LGYINZb5+25T79F/YlEkYgrZ2FGIRsICcIBESDeWCwy6ylUpBM V2zKjGcCQOOqDAaVM9JDnBywxqtlhQTe2zUycl/Nfu/neYDm9pvv5FCYlwgIgjlaFKon qijLthmxwxzfLSD6chkS330Fth3Ka9y9x7qqlMgJR+q9IVSReYpTZM+pBPx+bajzLC/i gdgOaq5y1OleHl+WxOftHmiawktLHpDIttWwTiQH6O4FjN0SpMsclzgRXxKQFc6W4VL+ cE1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=sv7OkXEfugylBjx0hMMr0QlJfMYdRDR8Sj/rjYEM3do=; b=xIFC2XxIT1CL77WZBDEGM38gq/Rzv7scOPt+gh/QRPRUhdXZb1Uc+unzZjaZJtxe1O n2El94b0OD9IgOb/EDfXaWy47aBrriTbPDrr2+P6qMvXe0CT4aFGY2Lwjhv7qedQwv/9 Z6TM/vdgBDIwPYRRVZ/NfdOhTaXw6ohUr8Lfl3fL8nYkWep4J9xfuXsg/sf05ULZOaB0 TRRq5udaEKyYDXCNLBezOwTKNkr0yre9VM3GMvJp3B1AcQMY8syLnX1CY+lvcuXVPKJX /PC4UoiY3lsRyfyTcfysAZx/WnQPOjet3FndHiCExla601l5F11RVXS1CkzKsEC4+FHa Tp7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si1616586ejg.304.2021.03.31.05.05.57; Wed, 31 Mar 2021 05:06:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235246AbhCaMFU (ORCPT + 99 others); Wed, 31 Mar 2021 08:05:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:56978 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235140AbhCaMFJ (ORCPT ); Wed, 31 Mar 2021 08:05:09 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 75AA1B1E6; Wed, 31 Mar 2021 12:05:08 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 306301E4415; Wed, 31 Mar 2021 14:05:08 +0200 (CEST) Date: Wed, 31 Mar 2021 14:05:08 +0200 From: Jan Kara To: ira.weiny@intel.com Cc: Jan Kara , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] ext2: Convert kmap to kmap_local_page Message-ID: <20210331120508.GG30749@quack2.suse.cz> References: <20210329065402.3297092-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210329065402.3297092-1-ira.weiny@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi Ira! On Sun 28-03-21 23:54:00, ira.weiny@intel.com wrote: > From: Ira Weiny > > kmap is inefficient and can be abused so it is being phased out in favor of > kmap_local_page where possible. > > ext2 uses kmap in ext2_[get|put]_page(). All of the calls to > ext2_[get|put]_page() occur in single threads so it is perfectly safe and > preferable to use kmap_local_page(). > > This series has a clean up which matches ext2_put_page() with ext2_dotdot() and > ext2_find_entry(). Those calls use ext2_get_page() to map the page prior to > returning it to their callers. And they document that ext2_put_page() should > be matched up with them. This was the case but the ext2_put_page() calls were > hidden in other functions. We lift the ext2_put_page() calls to match up to > the functions where ext2_dotdot() and ext2_find_entry() are called. > > After that clean up convert ext2_[get|put]_page() to kmap and adjust for > kunmap_local() requiring the page address. > > Nesting of kmap_local_page() calls is maintained with minor changes. Pulled into my tree. Thanks! Honza > > Ira Weiny (2): > ext2: Match up ext2_put_page() with ext2_dotdot() and > ext2_find_entry() > fs/ext2: Replace kmap() with kmap_local_page() > > fs/ext2/dir.c | 94 +++++++++++++++++++++++++++++++------------------ > fs/ext2/ext2.h | 12 ++++--- > fs/ext2/namei.c | 34 +++++++++++------- > 3 files changed, 89 insertions(+), 51 deletions(-) > > -- > 2.28.0.rc0.12.gb6a658bd00c9 > -- Jan Kara SUSE Labs, CR