Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3059745rwb; Thu, 29 Sep 2022 20:21:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM59yQUU8/QtYozct/vv5Xh84EmIxEdaauatmgvtKv0QifvorbAqVzIN5Ogl9tEPVQSlaIJH X-Received: by 2002:a17:907:6d89:b0:783:5465:908 with SMTP id sb9-20020a1709076d8900b0078354650908mr5273695ejc.26.1664508087944; Thu, 29 Sep 2022 20:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664508087; cv=none; d=google.com; s=arc-20160816; b=DhAHpnjiUR5IyisHO8ygPIoBQ8C5hBxdJgDJRnZFPdNlY1lQb1uToCiA34Ng4/R7BC WxFo4wwWdFtT4l0UymFJbGXO4jjKCWwEv2/DCEa9Bul8bu8t/mhW/BG8McfHlrkDZt6f uvrsnMGHWty7HeHmR75VJD3RBrfIXll4FZFTsEqxe3juZi4eB6ThXnGU3ctHCUz1GZnz 5w79P9CccorUpy/9+9hgDTrqFWoxm9p7TKdY9j1NXvk8HmY8ojrdF1b9OIMRoQAsUSsE A7mqkH/YZ1QgISY7feaDO3IHpmU2N3qUQH4EYQzP0CPFrFYZYFBvghCVxLBBMKdLT4+e JgEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=DHoxbDYBDL9k7m/rvR/V3CwrQxlP3ygdvVPvMeg5i80=; b=Hw21PR/F0bVJkVO+JSh4CWQije0NeJZ4awydPWJhAYHm/cFCy15azzKTi9fhGYkwEJ aQeJm7aaAtqWB29gR8hd+w+WaLEuBWpreDABmPyonIe7yl0Msp7ZvHRVfKI93np11yNy G2FaHBLE11HBPM93Xhch3ndViXatcg5yeSgq2IhPZwiQ4a2BWDn0CZcMRI2roLhgSKXZ 2cuVmQ9k0j+1HN3ipEfLwYLd61PD4Bo3nlx5w0p2qxqYr6BC2GTurgsrXlLqOFSZwMjn YfRNnZXfu49eY1B++FiV0XQ9SYCZm8EhjrpWm3EQLMKCwaMDN8M0o6siWgODTdpsWloE olKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="3px+hM/O"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb1-20020a1709077e8100b0078346f6a75fsi970475ejc.709.2022.09.29.20.21.02; Thu, 29 Sep 2022 20:21:27 -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=@infradead.org header.s=bombadil.20210309 header.b="3px+hM/O"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229946AbiI3DGs (ORCPT + 99 others); Thu, 29 Sep 2022 23:06:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbiI3DGp (ORCPT ); Thu, 29 Sep 2022 23:06:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2D7510C7A6 for ; Thu, 29 Sep 2022 20:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=DHoxbDYBDL9k7m/rvR/V3CwrQxlP3ygdvVPvMeg5i80=; b=3px+hM/OCOrV6L5mN5EQkp4qi5 XykN/VQduELLGS57D9ockO2T7CcsIaJiShTPCtRLD3xvYDLVAkHQA8nCAXYcXZ8UlwIkBG6h3N38a pp/Vp6uqNlus7Un5RzAaB0DI14jNujgwMRFk6VxCgCWg/m9v/eOTYIqKnmJGWYC7aufwSRy3zn5yC 9f4rxyJJT03YJRqI6cq0m29yD8NtGGJtRalpUxVlBJFRIYzJZOEyVMg/NcDStzVHQxYvahO309ggQ j86IgHVwT1bL5Lm0tfP8crGaCAPkSS7I+h9CdD8AGRcB7cb3GLPcHp1qppgrUu76iFFTV4i1uVwom j8HtMPUw==; Received: from [2601:1c2:d80:3110::a2e7] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oe6Ln-006rBt-DC; Fri, 30 Sep 2022 03:06:07 +0000 Message-ID: <5b329c5f-c4b6-5d58-422e-b90df66e13cb@infradead.org> Date: Thu, 29 Sep 2022 20:06:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v3] x86/mm/tlb: update some comments in pte_flags_need_flush Content-Language: en-US To: Xin Hao , namit@vmware.com Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, peterz@infradead.org, hpa@zytor.com, jroedel@suse.de, akpm@linux-foundation.org, linux-kernel@vger.kernel.org References: <20220930022434.51850-1-xhao@linux.alibaba.com> From: Randy Dunlap In-Reply-To: <20220930022434.51850-1-xhao@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 9/29/22 19:24, Xin Hao wrote: > There just changed the comment about 'flush_on_clear' check, which make > the explanation more reasonable. > > Suggested-by: Nadav Amit > Suggested-by: Randy Dunlap > Signed-off-by: Xin Hao Acked-by: Randy Dunlap Thanks. > --- > > Changes from v2 > (https://lore.kernel.org/lkml/20220929091040.45390-1-xhao@linux.alibaba.com/) > - fix some comments suggested-by Nadav Amit and > Randy Dunlap > > arch/x86/include/asm/tlbflush.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h > index cda3118f3b27..2a17698fb194 100644 > --- a/arch/x86/include/asm/tlbflush.h > +++ b/arch/x86/include/asm/tlbflush.h > @@ -291,8 +291,8 @@ static inline bool pte_flags_need_flush(unsigned long oldflags, > diff &= ~_PAGE_ACCESSED; > > /* > - * Did any of the 'flush_on_clear' flags was clleared set from between > - * 'oldflags' and 'newflags'? > + * Consider the 'flush_on_clear' flags that are set on 'oldflags', > + * Flush if any of these flags is cleared on 'newflags'. > */ > if (diff & oldflags & flush_on_clear) > return true; > -- > 2.31.0 -- ~Randy