Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754115AbdFWIas (ORCPT ); Fri, 23 Jun 2017 04:30:48 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:47934 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751231AbdFWIaq (ORCPT ); Fri, 23 Jun 2017 04:30:46 -0400 Reply-To: zhenzhong.duan@oracle.com Subject: Re: [PATCH RESEND] Calling check_system_tsc_reliable() before unsynchronized_tsc() To: Thomas Gleixner Cc: mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org References: From: Zhenzhong Duan Organization: Oracle Message-ID: <1a53c844-3724-e8e8-2aff-c494a5acb493@oracle.com> Date: Fri, 23 Jun 2017 16:30:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1504 Lines: 42 ?? 2017/6/22 21:56, Thomas Gleixner ะด??: > Zhenzhong, > > On Wed, 21 Jun 2017, Zhenzhong Duan wrote: > > So the patch format is now correct, but the subject line is missing a > proper subsystem prefix. Please use 'git log 'path/to/patched/file' next > time to see what the usually used prefix for a file is. > > In this case it's: x86/tsc > > Also please do not use [PATCH RESEND] when your patch is different from the > version you sent before. Please use [PATCH v2] instead. Got it. > >> unsynchronized_tsc() checks value of tsc_clocksource_reliable which is set by >> check_system_tsc_reliable(). It's better to move check_system_tsc_reliable() at >> front. > Please make your statements affirmative. 'It's better' is a weak expression. > >> Though X86_FEATURE_CONSTANT_TSC is usually set for TSC reliable system, just in >> case. > So what you wanted to say here is: > > tsc_clocksource_reliable is initialized in check_system_tsc_reliable(), > but it is checked in unsynchronized_tsc() which is called before the > initialization. > > In practice that's not an issue because systems which mark the TSC > reliable have X86_FEATURE_CONSTANT_TSC set as well, which is evaluated > in unsynchronized_tsc() before tsc_clocksource_reliable. > > Reorder the calls so initialization happens before usage. Exactly. > > All this information is also documented in Documentation/process/. I'll read them. > > No need to resend. I'll fix it up for you this time. Ok, thanks. zduan