Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5013583pxu; Tue, 13 Oct 2020 12:29:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtFokK2cccF+4b1oe7QTu0qnTscbxIi+NZnoF70UD0OSuBJqVWneL3OPt0cIDraYSrLO13 X-Received: by 2002:a17:906:24cd:: with SMTP id f13mr1300032ejb.329.1602617349528; Tue, 13 Oct 2020 12:29:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602617349; cv=none; d=google.com; s=arc-20160816; b=iyA0HAWgybEJ3O9iluMh5yF5MjPLmmZnR1sL92brBQWpKLu9MLkg3IMqZK6896H2gh Xr58TnqM7pcwgkeUC1A46mIHBPO+64Ypmvh2n6qVchIpChBdJLMJIpLTYYUGS/jxLJWS 66TT5FB7p6OtIc/y7uAC4g2XBS0xqoDmmCuIYt7CpozKoYwXFxQDCvU+XUyGLN446YCE LVg+Yt+2bZ72/11FtKDTR322Wn8Ewv4Bt8wxlpJl+OUeDtFJazgabXhb3VpRcMDicVxM JhHKTgWwRlvyuTKahFTTFtdcceYX9pabNW24yfkAesdelkHW11/JL9SY4u3hQglvtbFu WbFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=wb+DfRPVzMDbs/N26lo3GedT3mnvIXiv5dg7XviFZiQ=; b=fV+Kcyylqlbz3jdQqY7BX1haPriGbT4PG14cosY8frr9RbEcZ60T2nv2/ohlJJp8Gq Bqd2sYjJ8TGSq8vLWuHWxhwF7vEUyR241ES7n4zGPgfddGTKZP7UICE/SI8NR8KfhESn EkDGZYEzs48QisoxP6h0uf+LTE3hZS06PYDcBziFT0zwEEoSMa+uhG8r1yPc7i58gDB1 NH5YEQek0Y+50vwWIU/xhTY9ajtC8kF9PwthMwHvGmlhoZYBbtc0prxfeWwlF9hn1EUH ev60lPaVRUPbXfxVxieN6MSV9XSUoSaVG2tpVTvyDrPi54HBWDOs/mvCGeOokzyHtpeI o4zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=Epy+q5an; dkim=pass header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=v5OoWtfl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 q22si497946edb.85.2020.10.13.12.28.31; Tue, 13 Oct 2020 12:29:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@pobox.com header.s=sasl header.b=Epy+q5an; dkim=pass header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=v5OoWtfl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388823AbgJMSmu (ORCPT + 99 others); Tue, 13 Oct 2020 14:42:50 -0400 Received: from pb-sasl-trial2.pobox.com ([64.147.108.86]:53763 "EHLO pb-sasl-trial2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388132AbgJMSms (ORCPT ); Tue, 13 Oct 2020 14:42:48 -0400 X-Greylist: delayed 346 seconds by postgrey-1.27 at vger.kernel.org; Tue, 13 Oct 2020 14:42:45 EDT Received: from pb-sasl-trial2.pobox.com (localhost.local [127.0.0.1]) by pb-sasl-trial2.pobox.com (Postfix) with ESMTP id B35092F08C; Tue, 13 Oct 2020 14:36:58 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=1qdRcPgrMg9PaaTRWeHMHkWBgn4=; b=Epy+q5 ans9ahJwXxlQvxdjICPrBYTo3ECIn9AzWxzmuo835zX7Go5RA+la+QVdJswbYHqY OA9uOWP+RHqwo1f/1Hjwskkbh9itwsmr5IKrZUme2Q4YRp5bQABuumhmd/Yh0NKM sMhZUgbkZQs79wJJn2wtIPZ7EN0v5uRSG8bTQ= Received: from pb-smtp1.nyi.icgroup.com (pb-smtp1.pobox.com [10.90.30.53]) by pb-sasl-trial2.pobox.com (Postfix) with ESMTP id 7910C2F08B; Tue, 13 Oct 2020 14:36:58 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=/xoWviDLFg5PKRQ9rObRWDXVC++pmZtYhfbDb0DFq7E=; b=v5OoWtflZD131TYsBl2A9g0L/PCRe2nu6sy2IJY2ys8stI3sGPGydjk9hbVpZeTUKIjemrnRhLwKFlAM+dXEIGXz5t0LfwSiRA8m7hrB4WLH79+9F2ww8ICEhYu0fLjFgoDc1lKWqG4ZKNRDYjtbn/p6CJBipu1Te7ZvLuk/HMw= Received: from yoda.home (unknown [24.203.50.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id CD98F955F4; Tue, 13 Oct 2020 14:36:57 -0400 (EDT) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id CF7492DA0BC7; Tue, 13 Oct 2020 14:36:56 -0400 (EDT) Date: Tue, 13 Oct 2020 14:36:56 -0400 (EDT) From: Nicolas Pitre To: Ira Weiny cc: Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Peter Zijlstra , x86@kernel.org, Dave Hansen , Dan Williams , Fenghua Yu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, kexec@lists.infradead.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, devel@driverdev.osuosl.org, linux-efi@vger.kernel.org, linux-mmc@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-um@lists.infradead.org, linux-ntfs-dev@lists.sourceforge.net, reiserfs-devel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nilfs@vger.kernel.org, cluster-devel@redhat.com, ecryptfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-afs@lists.infradead.org, linux-rdma@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, drbd-dev@lists.linbit.com, linux-block@vger.kernel.org, xen-devel@lists.xenproject.org, linux-cachefs@redhat.com, samba-technical@lists.samba.org, intel-wired-lan@lists.osuosl.org Subject: Re: [PATCH RFC PKS/PMEM 33/58] fs/cramfs: Utilize new kmap_thread() In-Reply-To: <20201009195033.3208459-34-ira.weiny@intel.com> Message-ID: References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-34-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Pobox-Relay-ID: 13301A02-0D83-11EB-84D0-D152C8D8090B-78420484!pb-smtp1.pobox.com Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, 9 Oct 2020, ira.weiny@intel.com wrote: > From: Ira Weiny > > The kmap() calls in this FS are localized to a single thread. To avoid > the over head of global PKRS updates use the new kmap_thread() call. > > Cc: Nicolas Pitre > Signed-off-by: Ira Weiny Acked-by: Nicolas Pitre > fs/cramfs/inode.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c > index 912308600d39..003c014a42ed 100644 > --- a/fs/cramfs/inode.c > +++ b/fs/cramfs/inode.c > @@ -247,8 +247,8 @@ static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset, > struct page *page = pages[i]; > > if (page) { > - memcpy(data, kmap(page), PAGE_SIZE); > - kunmap(page); > + memcpy(data, kmap_thread(page), PAGE_SIZE); > + kunmap_thread(page); > put_page(page); > } else > memset(data, 0, PAGE_SIZE); > @@ -826,7 +826,7 @@ static int cramfs_readpage(struct file *file, struct page *page) > > maxblock = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; > bytes_filled = 0; > - pgdata = kmap(page); > + pgdata = kmap_thread(page); > > if (page->index < maxblock) { > struct super_block *sb = inode->i_sb; > @@ -914,13 +914,13 @@ static int cramfs_readpage(struct file *file, struct page *page) > > memset(pgdata + bytes_filled, 0, PAGE_SIZE - bytes_filled); > flush_dcache_page(page); > - kunmap(page); > + kunmap_thread(page); > SetPageUptodate(page); > unlock_page(page); > return 0; > > err: > - kunmap(page); > + kunmap_thread(page); > ClearPageUptodate(page); > SetPageError(page); > unlock_page(page); > -- > 2.28.0.rc0.12.gb6a658bd00c9 > >