Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5016786pxu; Tue, 13 Oct 2020 12:34:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziMfKjjnCEKqOHCDo8xct3nmb0QneLd3we2pZ8OtvfMZyhQJtiFgvt1b0q+0RTOxmZIeag X-Received: by 2002:a50:fe82:: with SMTP id d2mr1230570edt.86.1602617654246; Tue, 13 Oct 2020 12:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602617654; cv=none; d=google.com; s=arc-20160816; b=wZQxuZZZFu3Fg0s0QYf2o+QMuVdaiyfqJ3UAGpdOqfNfwBuV8d2IV3+gUjxefYkMrk brpFdzNf+tSKku5PnECzhL/I2eDwIC5F+pXvj+a4bSaI5Z5ErL4Ic1SvGudGCb1KTobe A2MBjJ3AE4HaeYvsVNKXJQnLcbUxh0+MqHd7snlcxy9xekHlASRqztzfRJ+rxUZYa64Q Ql990rVI2XtYFT8TsKvSMTh1I9A9A7kHNJH5u7+E6kJUZgTVnNlcBRjSvdi4hZIdqYAs CH5Y+oUqefb8En9A6+huBms1UcmYyKAb9KU6EyqBoG3gbMjxOrD2v7Epe+6VDnqpxem1 DtMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ACWQZXFIYAYZvPtA0kqqET9/h2VeNuWUmvFkuiSdGDk=; b=MCf+3LgiY43X64AsL+8nnm5ALpUsQQ730bT88Jt8l7UkFN+p/8CzcS5WHOif4fkz4z S/XS7ap51yVCQYmmVZMQaUz2JAqcKX1zbgsTCacttJqh8yxbxy5YxnIHlYp4iQQtg0N7 BTA8xkn++CGeTIE0wg/Ulpoh0VjVxC6ZF5c8glBli+j3O1XP+dsKAl9T/2YlaMk83Z5X b5OpqNjEYJwfP/7tRHWxVFcIAuPhvF2UvJx4ymYD9QKQnGzwPLSAJ6HiKjIRUexDofcj lYvNZGihj+h8Qyv74ykNUzqzT/A+to4iUYLNbS6uwF/Edg8WksrY9/SUN9sMPt7RbGza xduQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=DayNIijN; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q19si510400edc.517.2020.10.13.12.33.50; Tue, 13 Oct 2020 12:34:14 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=DayNIijN; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732271AbgJMSon (ORCPT + 99 others); Tue, 13 Oct 2020 14:44:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726668AbgJMSom (ORCPT ); Tue, 13 Oct 2020 14:44:42 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7839EC0613D0 for ; Tue, 13 Oct 2020 11:44:42 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id cq12so560342edb.2 for ; Tue, 13 Oct 2020 11:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ACWQZXFIYAYZvPtA0kqqET9/h2VeNuWUmvFkuiSdGDk=; b=DayNIijN9rJ4wynxycYBrXAQR84x3xjByl1z2VFzt7YCa69TNkAlkIdWKG0xwP6Yp3 3F/H2nz44gihJO9JHyXWzYL4P1dc46CKqiaNR3yRo/w37eMMjkAo/koyRg9J9cet4J5o 8pAZLke452kN1ce4bdWIlGHc47qEL6KSVsDbeqJDAMDzDUrFyC9OKIrNu9C/VaSoREWg 9B9an2yfiyuzSelcHqdOabrCOxSG6vx+IObNMb98zyieMNME4f/11W7Es7O7m/+Kevvk a0bkM4fWgVplo/2Lunr6iSwR8tSVOWAyX1+gyP4UJdvdg+R8/4qIc/xXlFMWt9dzq4A3 WVxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ACWQZXFIYAYZvPtA0kqqET9/h2VeNuWUmvFkuiSdGDk=; b=atT8ECyTRaBJrTpkFKfO8ddp0M30XQUo9IrCu9vnmNeTxCTg5BNh0WZeOjelxMG2+l 4j/cj5YAWFUyGJlXVp1KPmynQtzpEIzpzcRFBK6rMueH5RGWWGi0sp9f3X9W25yX8o4S gkcJH5x3zc79v+2/qyVFBd6BM+6IsU1GtccqzWSktEcHDkpjBTOWQn7TydMsgJsWPecE iBngh2P6M+xoEt/R8wQQt7b/FJneZYxwECIDGG2mDHAcwot5ewwVNAJ3+IBOlzI2mvy+ ZgEfYw0PIRvCUyBZP0Kdph2pj6hqYq2LDxvS/2QC5mVC8qkT6iBL0a5WyV+YfY5isJNx 3BUw== X-Gm-Message-State: AOAM530qH7xNqUJVjt9Y4AfrIs3mx1KfKMOgjA22HNanYFQ533NuYu+i UXdPEjzr6YawKzryy8ROLXOzkY3pRAi6SEkTN43d4A== X-Received: by 2002:a50:8e1e:: with SMTP id 30mr1027503edw.354.1602614681174; Tue, 13 Oct 2020 11:44:41 -0700 (PDT) MIME-Version: 1.0 References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-34-ira.weiny@intel.com> In-Reply-To: <20201009195033.3208459-34-ira.weiny@intel.com> From: Dan Williams Date: Tue, 13 Oct 2020 11:44:29 -0700 Message-ID: Subject: Re: [PATCH RFC PKS/PMEM 33/58] fs/cramfs: Utilize new kmap_thread() To: "Weiny, Ira" Cc: Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Peter Zijlstra , Nicolas Pitre , X86 ML , Dave Hansen , Fenghua Yu , Linux Doc Mailing List , Linux Kernel Mailing List , linux-nvdimm , linux-fsdevel , Linux MM , linux-kselftest@vger.kernel.org, linuxppc-dev , KVM list , Netdev , bpf@vger.kernel.org, Kexec Mailing List , linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, devel@driverdev.osuosl.org, linux-efi , linux-mmc@vger.kernel.org, linux-scsi , target-devel@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, linux-ext4 , 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 , linux-afs@lists.infradead.org, linux-rdma , amd-gfx list , Maling list - DRI developers , intel-gfx@lists.freedesktop.org, drbd-dev@lists.linbit.com, linux-block@vger.kernel.org, xen-devel , linux-cachefs@redhat.com, samba-technical@lists.samba.org, intel-wired-lan@lists.osuosl.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 9, 2020 at 12:52 PM 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 > --- > 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); Why does this need a sleepable kmap? This looks like a textbook kmap_atomic() use case.