From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90235C04EBE for ; Mon, 12 Oct 2020 05:28:27 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B7B220790 for ; Mon, 12 Oct 2020 05:28:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B7B220790 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B825415C890CF; Sun, 11 Oct 2020 22:28:26 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=ira.weiny@intel.com; receiver= Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 41E19158BD04B for ; Sun, 11 Oct 2020 22:28:24 -0700 (PDT) IronPort-SDR: Mui+awipRrHu+EwyrhLxpPdcYc6JINKOOcrCW4BypPaOP4HaxbJxpOxIb9usg9d4zGpzpLoOeW H67Z4DtEUZ4A== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="145556283" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="145556283" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:23 -0700 IronPort-SDR: Awdi9Evv+UAQx0jH4ny/s7+Nxcmli85F+a73BOsSCHQvCG+q13xwJ2JLwUM5pKItlqpgm8qi5b o2XGvRLHUUbw== X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="529816997" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:22 -0700 Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny To: Coly Li Subject: Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) Message-ID-Hash: 7U4PUTDELNV47B3X4G4SAB3VAU2WOHLA X-Message-ID-Hash: 7U4PUTDELNV47B3X4G4SAB3VAU2WOHLA X-MailFrom: ira.weiny@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Peter Zijlstra , Kent Overstreet , x86@kernel.org, Dave Hansen , 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@l ists.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 X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9204C4363A for ; Mon, 12 Oct 2020 05:28:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A92F20790 for ; Mon, 12 Oct 2020 05:28:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726774AbgJLF2Z (ORCPT ); Mon, 12 Oct 2020 01:28:25 -0400 Received: from mga17.intel.com ([192.55.52.151]:47714 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726753AbgJLF2Y (ORCPT ); Mon, 12 Oct 2020 01:28:24 -0400 IronPort-SDR: GbtTGQ+LIQEViS39Onovks2tUDOKKPU08qCafY5K9+vdym21FqKofkTnIdrJANf0p7lkfhRJrl S2tkbyTKSPrw== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="145556285" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="145556285" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:23 -0700 IronPort-SDR: Awdi9Evv+UAQx0jH4ny/s7+Nxcmli85F+a73BOsSCHQvCG+q13xwJ2JLwUM5pKItlqpgm8qi5b o2XGvRLHUUbw== X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="529816997" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:22 -0700 Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny To: Coly Li Cc: Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Peter Zijlstra , Kent Overstreet , 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 48/58] drivers/md: Utilize new kmap_thread() Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ira Weiny Date: Mon, 12 Oct 2020 05:28:18 +0000 Subject: Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() Message-Id: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> List-Id: References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Coly Li Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82E01C433E7 for ; Mon, 12 Oct 2020 05:28:55 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27B3F2076E; Mon, 12 Oct 2020 05:28:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="NYJz0aQq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="FrLuekEO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27B3F2076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kRqO9-0007Ha-VR; Mon, 12 Oct 2020 05:28:49 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRqO7-0007H6-Nq; Mon, 12 Oct 2020 05:28:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/TalSpFJssBNTOZOITkKJvyppTUK4XtPcdlTE2914sc=; b=NYJz0aQqtA8JKQ37oM1Bqb5sjl J1jem/FER8lkJZvGDWsTrLD5tC7eTm6V5TfDB2UN8xpJLEZK4l9O+wyLEv6GfYTPr1OMfvWB56iF1 QMZvNqbkrzWQugdeTzXLpM/1jqPOiG1ByjGBdCQ6gBgWp2huZ3hgqI9/zSvTxERPNQGQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/TalSpFJssBNTOZOITkKJvyppTUK4XtPcdlTE2914sc=; b=FrLuekEOVxY+BtKrd2aPo6Iand +V8SBYweVfLYXvODKl6rehDS4j4YXesEohx/sgngu2c2QUOnoaLyAH+BkR/DiC+GfJ6l0bz9S88Hx afIXsyGLn5ShHpeuyEWWMeCK0kuGAXLe8nA0KIYx01X5Mlq1c7SPJ/rC+C462C685BIw=; Received: from mga06.intel.com ([134.134.136.31]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1kRqNx-00BfFZ-Ct; Mon, 12 Oct 2020 05:28:47 +0000 IronPort-SDR: 7gCNhy1okhgg4seQJYb7pEyJ65O/hzI6v3GLJtSd8gVgnsyTta2mzYe3QwlZLBpunrIfpZYnto dA9m+qdPHzQQ== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="227337794" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="227337794" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:23 -0700 IronPort-SDR: Awdi9Evv+UAQx0jH4ny/s7+Nxcmli85F+a73BOsSCHQvCG+q13xwJ2JLwUM5pKItlqpgm8qi5b o2XGvRLHUUbw== X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="529816997" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:22 -0700 Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny To: Coly Li Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) X-Headers-End: 1kRqNx-00BfFZ-Ct Subject: Re: [f2fs-dev] [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B40EEC4363A for ; Mon, 12 Oct 2020 05:28:32 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52F562076E for ; Mon, 12 Oct 2020 05:28:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52F562076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 32B7886844; Mon, 12 Oct 2020 05:28:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VC+BJsfL7Ra8; Mon, 12 Oct 2020 05:28:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 81D1C86760; Mon, 12 Oct 2020 05:28:27 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B04A81BF95D for ; Mon, 12 Oct 2020 05:28:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9E0772075B for ; Mon, 12 Oct 2020 05:28:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q2A2KJyyUA+A for ; Mon, 12 Oct 2020 05:28:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by silver.osuosl.org (Postfix) with ESMTPS id 4EBBC203A8 for ; Mon, 12 Oct 2020 05:28:24 +0000 (UTC) IronPort-SDR: KCTbtRZdXMOcTVUaN77pQ5yUk5UHB8ORAPYZno7bVhq3M33+Ea/lPsfABs4x1PvBgU6a5mbhg8 T5i0IRqbABpw== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="153522269" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="153522269" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:23 -0700 IronPort-SDR: Awdi9Evv+UAQx0jH4ny/s7+Nxcmli85F+a73BOsSCHQvCG+q13xwJ2JLwUM5pKItlqpgm8qi5b o2XGvRLHUUbw== X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="529816997" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:22 -0700 Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny To: Coly Li Subject: Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A45EC433E7 for ; Mon, 12 Oct 2020 05:30:16 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0A752076E for ; Mon, 12 Oct 2020 05:30:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0A752076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4C8nLr47przDqg7 for ; Mon, 12 Oct 2020 16:30:12 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=intel.com (client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=ira.weiny@intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=intel.com Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4C8nJr09vpzDqSD; Mon, 12 Oct 2020 16:28:26 +1100 (AEDT) IronPort-SDR: lrxq8SmAoPUbPnmlepYkrFzQHLNo1dMSNwv1kdur+rz8j4KuEkepzImeWXbMtSyGx79NMp62p+ RoDUOlTPohEw== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="153522270" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="153522270" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:23 -0700 IronPort-SDR: Awdi9Evv+UAQx0jH4ny/s7+Nxcmli85F+a73BOsSCHQvCG+q13xwJ2JLwUM5pKItlqpgm8qi5b o2XGvRLHUUbw== X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="529816997" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:22 -0700 Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny To: Coly Li Subject: Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B8FBC433DF for ; Mon, 12 Oct 2020 05:29:13 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 585EA2076E for ; Mon, 12 Oct 2020 05:29:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AUK0LJWU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 585EA2076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4drnMDQ+/OGg+5nW8YZJq/F7O2hZBvFnBg5n8Or1OL8=; b=AUK0LJWUsyuHngFFP1Upr34oI nESZPYCq4nNZKLsDCx9VmeVt0cb6hqlNBqTpiNzioTVX9ZKkqUY+FeSF2OTYOpmilYtau/HTvvWHM YhJKtwS/fU4LvS9Op4KoAXIMeBqOD0ltgS3NM4H/5RtqeWp4N9AxVaUx2udmctw/ERn2i8HY5io5U vak+b8fvT3/lkAIl0TpQptgH4wHp8AhkSATKoE+nPl6u3AKxOU7i44lj2SWnX4MVC/GD7OkUUbGH/ qM/KkAvManvAqBjJbijJsvVNAfpUmz6aCWc0SbJ5XPAUW85UK3cioCkx9gXCkYVtbE/naZNUs5jN+ inUgTvvcA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRqNx-0008C6-9b; Mon, 12 Oct 2020 05:28:37 +0000 Received: from mga17.intel.com ([192.55.52.151]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kRqNu-0008A0-5f; Mon, 12 Oct 2020 05:28:35 +0000 IronPort-SDR: kb6Rl8UAO5Sz/uC4efoTasXhuwL90sldZS/IILGD25IvZq69ra25LZzcM7U8gXkmnS/k3p/usT V0bAUjAABCVg== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="145556284" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="145556284" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:23 -0700 IronPort-SDR: Awdi9Evv+UAQx0jH4ny/s7+Nxcmli85F+a73BOsSCHQvCG+q13xwJ2JLwUM5pKItlqpgm8qi5b o2XGvRLHUUbw== X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="529816997" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:22 -0700 Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny To: Coly Li Subject: Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201012_012834_392731_B1E3F29A X-CRM114-Status: GOOD ( 21.15 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBDCBC4363D for ; Mon, 12 Oct 2020 05:28:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 982662076E for ; Mon, 12 Oct 2020 05:28:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 982662076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A1ECD6E086; Mon, 12 Oct 2020 05:28:27 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3C8C6E07D; Mon, 12 Oct 2020 05:28:25 +0000 (UTC) IronPort-SDR: 2KdJLvv+gy2scbZTa7CUYvQR3W0nRz6A4hSoVNe3Livymen/RjI0UKME1ZSKlOZ1kVLSNTdfeQ PcBjShwC6n7w== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="163052538" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="163052538" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:23 -0700 IronPort-SDR: Awdi9Evv+UAQx0jH4ny/s7+Nxcmli85F+a73BOsSCHQvCG+q13xwJ2JLwUM5pKItlqpgm8qi5b o2XGvRLHUUbw== X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="529816997" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:22 -0700 Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny To: Coly Li Subject: Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 129BAC433E7 for ; Mon, 12 Oct 2020 05:28:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB52D2078A for ; Mon, 12 Oct 2020 05:28:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB52D2078A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A82E76E418; Mon, 12 Oct 2020 05:28:27 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3C8C6E07D; Mon, 12 Oct 2020 05:28:25 +0000 (UTC) IronPort-SDR: 2KdJLvv+gy2scbZTa7CUYvQR3W0nRz6A4hSoVNe3Livymen/RjI0UKME1ZSKlOZ1kVLSNTdfeQ PcBjShwC6n7w== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="163052538" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="163052538" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:23 -0700 IronPort-SDR: Awdi9Evv+UAQx0jH4ny/s7+Nxcmli85F+a73BOsSCHQvCG+q13xwJ2JLwUM5pKItlqpgm8qi5b o2XGvRLHUUbw== X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="529816997" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:22 -0700 Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny To: Coly Li Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) Subject: Re: [Intel-gfx] [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72844C433E7 for ; Mon, 12 Oct 2020 09:00:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BBF020773 for ; Mon, 12 Oct 2020 09:00:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BBF020773 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 07C9E6E437; Mon, 12 Oct 2020 09:00:09 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3C8C6E07D; Mon, 12 Oct 2020 05:28:25 +0000 (UTC) IronPort-SDR: 2KdJLvv+gy2scbZTa7CUYvQR3W0nRz6A4hSoVNe3Livymen/RjI0UKME1ZSKlOZ1kVLSNTdfeQ PcBjShwC6n7w== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="163052538" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="163052538" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:23 -0700 IronPort-SDR: Awdi9Evv+UAQx0jH4ny/s7+Nxcmli85F+a73BOsSCHQvCG+q13xwJ2JLwUM5pKItlqpgm8qi5b o2XGvRLHUUbw== X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="529816997" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 22:28:22 -0700 Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny To: Coly Li Subject: Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) X-Mailman-Approved-At: Mon, 12 Oct 2020 09:00:07 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ira Weiny Date: Sun, 11 Oct 2020 22:28:18 -0700 Subject: [Intel-wired-lan] [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() In-Reply-To: References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny at intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny Subject: Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Coly Li Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 11 Oct 2020 22:28:18 -0700 From: Ira Weiny Subject: Re: [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Coly Li Cc: linux-aio@kvack.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, Peter Zijlstra , linux-mmc@vger.kernel.org, Dave Hansen , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, target-devel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kselftest@vger.kernel.org, samba-technical@lists.samba.org, Thomas Gleixner , drbd-dev@lists.linbit.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, x86@kernel.org, ceph-devel@vger.kernel.org, amd-gfx@lists.freedesktop.org, io-uring@vger.kernel.org, cluster-devel@redhat.com, Ingo Molnar , intel-wired-lan@lists.osuosl.org, xen-devel@lists.xenproject.org, linux-ext4@vger.kernel.org, Kent Overstreet , Fenghua Yu , linux-afs@lists.infradead.org, linux-um@lists.infradead.org, intel-gfx@lists.freedesktop.org, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Borislav Petkov , Andy Lutomirski , Dan Williams , Andrew Morton , linux-cachefs@redhat.com, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-btrfs@vger.kernel.org On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li > _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ira Weiny Date: Sun, 11 Oct 2020 22:28:18 -0700 Subject: [Cluster-devel] [PATCH RFC PKS/PMEM 48/58] drivers/md: Utilize new kmap_thread() In-Reply-To: References: <20201009195033.3208459-1-ira.weiny@intel.com> <20201009195033.3208459-49-ira.weiny@intel.com> Message-ID: <20201012052817.GZ2046448@iweiny-DESK2.sc.intel.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote: > On 2020/10/10 03:50, ira.weiny at intel.com wrote: > > From: Ira Weiny > > > > These kmap() calls are localized to a single thread. To avoid the over > > head of global PKRS updates use the new kmap_thread() call. > > > > Hi Ira, > > There were a number of options considered. > > 1) Attempt to change all the thread local kmap() calls to kmap_atomic() > 2) Introduce a flags parameter to kmap() to indicate if the mapping > should be global or not > 3) Change ~20-30 call sites to 'kmap_global()' to indicate that they > require a global mapping of the pages > 4) Change ~209 call sites to 'kmap_thread()' to indicate that the > mapping is to be used within that thread of execution only > > > I copied the above information from patch 00/58 to this message. The > idea behind kmap_thread() is fine to me, but as you said the new api is > very easy to be missed in new code (even for me). I would like to be > supportive to option 2) introduce a flag to kmap(), then we won't forget > the new thread-localized kmap method, and people won't ask why a > _thread() function is called but no kthread created. Thanks for the feedback. I'm going to hold off making any changes until others weigh in. FWIW, I kind of like option 2 as well. But there is already kmap_atomic() so it seemed like kmap_XXXX() was more in line with the current API. Thanks, Ira > > Thanks. > > > Coly Li >