Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2132104rwb; Sun, 4 Sep 2022 09:01:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR7uULY+0VUS3qviUS9w6zlfNsXVoPGIhPtoCqfhVH+cS9eco6PEAn1RhWi/Wccba+i1euga X-Received: by 2002:a17:902:ec90:b0:16d:d156:2c01 with SMTP id x16-20020a170902ec9000b0016dd1562c01mr46551188plg.114.1662307264819; Sun, 04 Sep 2022 09:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662307264; cv=none; d=google.com; s=arc-20160816; b=IehcNlTn0rWqE9CNuEhiKogeFsrSMJYJZe3nyYwK3KdMf1xid1MoslORFHJT8X/Agi HIzApF97LjkOLIzvJV6uNmgXEtITQd4SLlv60c111Bk7fgrQ8VUASZJpvhmlI/cTWg75 rPjD5cde4GnAwcA+9P5emEdrTnIcPaIKz5lNkH5hm+dXK3Ooq8zzBxC02lzEwsxlUhpd MOmXTpOCTuXbh2B+UwsPQHinelljO1bUQ+BHshmf+zxct+Onv29ihpIdduvTpD3znTjp 6SNpOjkygfFXFzju0fBLOf2xQf0ySEL1j4uvJ99YTZ1D5s4BdRcrqmalkCutaWB1e8LJ wipg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TUtrRKB/Um/L7B+WEAerSUEIqDB/4ajkAtaDJqFsMjA=; b=ensb2On6dxgmUiIuwaV0K5nWa7ByjFI7j4TF46+qsMwulNEONn7yqvDbL8QpkfTda6 fG+gDgq2KdLRDdTZk0havswY6x/1uDYdEXqNJ+l4vce0i5dgP8qmeSKGDLrzXBvMfgDI fupS+IeIPIwiPJohEk3yz0f1LQAOVCN5oS/GuyMZZ6O2SdXMoTPJUP6PCAi61NC3A3HU PBi7C6J0j+kpu9pJzZelxDVurcktJajQU6xPIhjEiay1hlhuiwrRkpWlqMPzxHJlhwq/ D7/zeTMroE122oG0IaexfRHMdFX6v54lWT2OlnblCuYT00R1lSXhfKibyzxm2SI7mquB 2XoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XBqPxJh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r22-20020a63fc56000000b0041d946ca0a9si7466501pgk.257.2022.09.04.09.00.53; Sun, 04 Sep 2022 09:01:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XBqPxJh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234566AbiIDPta (ORCPT + 99 others); Sun, 4 Sep 2022 11:49:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234332AbiIDPtZ (ORCPT ); Sun, 4 Sep 2022 11:49:25 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72028DEC; Sun, 4 Sep 2022 08:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662306564; x=1693842564; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=9r82ZTSuD0x+QvHSVy2lzg+W+9scndMmZbzkLh1CQPM=; b=XBqPxJh+GcpszFbdqbqSXJDCUVQTM7le8T4DltMg2ax6/+j/kpLFp8YH rO6GivNHOL4eHNdl1FpcKgUinRwUTE3zsTVOdwTu03iLuj/8/b/oEaPUJ N9XTCUTBzqimLDnCDQ6RgWcgrKPNOPyNZYFdpHVmAWKg4nu2m2zowL0O1 TeTPtRi7nnkwTGyfWw6IUAcc3TCgkVuaaS+j8tjiTrS2xvrK8huKbRQEv okIN/gGlj5agaGot8O6ahCRJLRYG6vCM8l/TWTvuJMC4UTkcR0kwsSMCV UOjfoswomal8bX+sHzFKFxq2IhsQfopVODAAxYV3b0H8zaVFk5pXXwCYf w==; X-IronPort-AV: E=McAfee;i="6500,9779,10460"; a="297553926" X-IronPort-AV: E=Sophos;i="5.93,289,1654585200"; d="scan'208";a="297553926" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2022 08:49:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,289,1654585200"; d="scan'208";a="674974980" Received: from liuzhao-optiplex-7080.sh.intel.com (HELO localhost) ([10.239.160.132]) by fmsmga008.fm.intel.com with ESMTP; 04 Sep 2022 08:49:20 -0700 Date: Sun, 4 Sep 2022 23:54:15 +0800 From: Zhao Liu To: Dave Hansen Cc: Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, "Fabio M. De Francesco" , Ira Weiny , Zhenyu Wang , Zhao Liu Subject: Re: [PATCH] KVM: SVM: Replace kmap_atomic() with kmap_local_page() Message-ID: References: <20220902090811.2430228-1-zhao1.liu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 02, 2022 at 08:09:29AM -0700, Dave Hansen wrote: > This changelog is a little on the weak side. You could literally take > any arbitrary call-site and file for kmap_atomic() and slap that > changelog on it. For instance: > > In drivers/target/target_core_sbc.c, the function > sbc_dif_copy_prot() doesn't need to disable pagefaults and > preemption in kmap_atomic(). It can simply use kmap_local_page() > / kunmap_local() that can instead do the mapping / unmapping > regardless of the context. > > With kmap_local_page(), the mapping is per thread, CPU local and > not globally visible. Therefore, sbc_dif_copy_prot() is a > function where the use of kmap_local_page() in place of > kmap_atomic() is correctly suited. > > That's all valid English and there's nothing incorrect in it. But, it > doesn't indicate that any actual analysis was performed. It's utterly > generic. It could literally have been generated by a pretty trivial script. > > It would be great to add at least a small, call-site-specific human > touch to these changelogs. > > In this case, saying something about how global the cache flush is would > be a great addition. Thanks Dave! I'll add more detail to the commit message and avoid overly templated changelogs. Zhao