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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 4B404C10F11 for ; Wed, 24 Apr 2019 07:27:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19B4220656 for ; Wed, 24 Apr 2019 07:27:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556090825; bh=KaDBoJJjYnObOploCwYXMgY0kxZJHH/0nJJXTWbCmsc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=dZH9TyOWAPWGxtHbPzl+R1nAPkFfcJRk/5GNXkSzZ/reCWfewI/iwtTMk+eQtNxs1 3YDSFIRBnc1PG6+djFmp3Dt6vVG0hgMfozVB71xHFTxOV/j8cpjb1YSBZgSdjS5PlK RcWrtPbvMKPVTUG4usW2LegJqxModRw1rSX7PPow= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730159AbfDXH1E (ORCPT ); Wed, 24 Apr 2019 03:27:04 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:39876 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727137AbfDXH1D (ORCPT ); Wed, 24 Apr 2019 03:27:03 -0400 Received: by mail-ot1-f66.google.com with SMTP id o39so2148100ota.6; Wed, 24 Apr 2019 00:27:03 -0700 (PDT) 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=uLNO+ALEpjn7XZDs/HjjZU+KRBu1qko3HM25uVzxfDc=; b=JeU2jpjdH39HRV65RHPbmDfp+dSthy++iJVk9q+eBh/E9V2cLNQoCtQzWeZAxdWbYI 5aJD3fvbdBaSrjKu2ptCCBXDsgnfrZS7sGrFGgXKofM3Z5qNnKUQepiv7fPGnaoIddKK hoBsPS3AfEXkQDCCa8lo+R1kmHPMcQC80odliONjzpFHGH3GubRwTW3rb6Aiqpkoac4k HaTP8N5FNqYM1pv7idT6hw9hMrf9MWBaLYaoplzXKgjomf7ZLcmxzNRnAqbSnublWgjw Rnox7H7aoWflwARusVRTva0WA3qsj7KbhgHeVtn/e9Y6XExi4iTSTef4Q1iH38Xpsa3q FDSA== X-Gm-Message-State: APjAAAWHnwDB5VaBYQVU5aURJmoW8d1/AVMwoX2CwuMCN0YmYdv/NQZ+ hLAjtrAGU1lod4LldLVJzkwh1IRmvTBewVEOFVwmqQ== X-Google-Smtp-Source: APXvYqxyJrPNyV1aF82bL58Ait5kA70e7vPVXRilnf06niz6tAVSDHy39L3jZG3x8lr63UeZyYjasO/vFmrE+ISSHf4= X-Received: by 2002:a9d:7a50:: with SMTP id z16mr17331301otm.363.1556090822516; Wed, 24 Apr 2019 00:27:02 -0700 (PDT) MIME-Version: 1.0 References: <1eb27e3bbcbb2c67e6eadc0893c9b41e5d76894b.1553057341.git.viresh.kumar@linaro.org> <20190321114535.GM6058@hirez.programming.kicks-ass.net> <20190322061957.hzhnlbmnkpuqviiv@vireshk-i7> <20190424064753.lwfsdeodncaai5oz@vireshk-i7> In-Reply-To: <20190424064753.lwfsdeodncaai5oz@vireshk-i7> From: "Rafael J. Wysocki" Date: Wed, 24 Apr 2019 09:26:50 +0200 Message-ID: Subject: Re: [PATCH V3] cpufreq: Call transition notifier only once for each policy To: Viresh Kumar Cc: Peter Zijlstra , Rafael Wysocki , Russell King , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "the arch/x86 maintainers" , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Linux PM , Vincent Guittot , Linux ARM , Linux Kernel Mailing List , sparclinux@vger.kernel.org, kvm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 24, 2019 at 8:48 AM Viresh Kumar wrote: > > On 22-03-19, 11:49, Viresh Kumar wrote: > > On 21-03-19, 12:45, Peter Zijlstra wrote: > > > On Wed, Mar 20, 2019 at 10:22:23AM +0530, Viresh Kumar wrote: > > > > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > > > index 65e4559eef2f..1ac8c710cccc 100644 > > > > --- a/arch/x86/kvm/x86.c > > > > +++ b/arch/x86/kvm/x86.c > > > > @@ -6649,10 +6649,8 @@ static void kvm_hyperv_tsc_notifier(void) > > > > } > > > > #endif > > > > > > > > -static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val, > > > > - void *data) > > > > +static void __kvmclock_cpufreq_notifier(struct cpufreq_freqs *freq, int cpu) > > > > { > > > > - struct cpufreq_freqs *freq = data; > > > > struct kvm *kvm; > > > > struct kvm_vcpu *vcpu; > > > > int i, send_ipi = 0; > > > > @@ -6696,17 +6694,12 @@ static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long va > > > > * > > > > */ > > > > > > > > - if (val == CPUFREQ_PRECHANGE && freq->old > freq->new) > > > > - return 0; > > > > - if (val == CPUFREQ_POSTCHANGE && freq->old < freq->new) > > > > - return 0; > > > > - > > > > - smp_call_function_single(freq->cpu, tsc_khz_changed, freq, 1); > > > > + smp_call_function_single(cpu, tsc_khz_changed, freq, 1); > > > > > > > > spin_lock(&kvm_lock); > > > > list_for_each_entry(kvm, &vm_list, vm_list) { > > > > kvm_for_each_vcpu(i, vcpu, kvm) { > > > > - if (vcpu->cpu != freq->cpu) > > > > + if (vcpu->cpu != cpu) > > > > continue; > > > > kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu); > > > > if (vcpu->cpu != smp_processor_id()) > > > > @@ -6728,8 +6721,24 @@ static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long va > > > > * guest context is entered kvmclock will be updated, > > > > * so the guest will not see stale values. > > > > */ > > > > - smp_call_function_single(freq->cpu, tsc_khz_changed, freq, 1); > > > > + smp_call_function_single(cpu, tsc_khz_changed, freq, 1); > > > > } > > > > +} > > > > + > > > > +static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val, > > > > + void *data) > > > > +{ > > > > + struct cpufreq_freqs *freq = data; > > > > + int cpu; > > > > + > > > > + if (val == CPUFREQ_PRECHANGE && freq->old > freq->new) > > > > + return 0; > > > > + if (val == CPUFREQ_POSTCHANGE && freq->old < freq->new) > > > > + return 0; > > > > + > > > > + for_each_cpu(cpu, freq->policy->cpus) > > > > + __kvmclock_cpufreq_notifier(freq, cpu); > > > > + > > > > return 0; > > > > } > > > > > > > > > > Then why to we pretend otherwise here? > > > > My intention was to not add any bug here because of lack of my > > knowledge of the architecture in question and so I tried to be safe. > > > > If you guys think the behavior should be same here as of the tsc, then > > we can add similar checks here. > > I am rebasing this patch over Rafael's patch [1] and wondering if I > should change anything here. I guess please repost when my patch makes it into linux-next. > [1] https://lore.kernel.org/lkml/38900622.ao2n2t5aPS@kreacher/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Date: Wed, 24 Apr 2019 07:26:50 +0000 Subject: Re: [PATCH V3] cpufreq: Call transition notifier only once for each policy Message-Id: List-Id: References: <1eb27e3bbcbb2c67e6eadc0893c9b41e5d76894b.1553057341.git.viresh.kumar@linaro.org> <20190321114535.GM6058@hirez.programming.kicks-ass.net> <20190322061957.hzhnlbmnkpuqviiv@vireshk-i7> <20190424064753.lwfsdeodncaai5oz@vireshk-i7> In-Reply-To: <20190424064753.lwfsdeodncaai5oz@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Viresh Kumar Cc: Peter Zijlstra , Rafael Wysocki , Russell King , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , the arch/x86 maintainers , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Linux PM , Vincent Guittot , Linux ARM , Linux Kernel Mailing List , sparclinux@vger.kernel.org, kvm@vger.kernel.org On Wed, Apr 24, 2019 at 8:48 AM Viresh Kumar wrote: > > On 22-03-19, 11:49, Viresh Kumar wrote: > > On 21-03-19, 12:45, Peter Zijlstra wrote: > > > On Wed, Mar 20, 2019 at 10:22:23AM +0530, Viresh Kumar wrote: > > > > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > > > index 65e4559eef2f..1ac8c710cccc 100644 > > > > --- a/arch/x86/kvm/x86.c > > > > +++ b/arch/x86/kvm/x86.c > > > > @@ -6649,10 +6649,8 @@ static void kvm_hyperv_tsc_notifier(void) > > > > } > > > > #endif > > > > > > > > -static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val, > > > > - void *data) > > > > +static void __kvmclock_cpufreq_notifier(struct cpufreq_freqs *freq, int cpu) > > > > { > > > > - struct cpufreq_freqs *freq = data; > > > > struct kvm *kvm; > > > > struct kvm_vcpu *vcpu; > > > > int i, send_ipi = 0; > > > > @@ -6696,17 +6694,12 @@ static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long va > > > > * > > > > */ > > > > > > > > - if (val = CPUFREQ_PRECHANGE && freq->old > freq->new) > > > > - return 0; > > > > - if (val = CPUFREQ_POSTCHANGE && freq->old < freq->new) > > > > - return 0; > > > > - > > > > - smp_call_function_single(freq->cpu, tsc_khz_changed, freq, 1); > > > > + smp_call_function_single(cpu, tsc_khz_changed, freq, 1); > > > > > > > > spin_lock(&kvm_lock); > > > > list_for_each_entry(kvm, &vm_list, vm_list) { > > > > kvm_for_each_vcpu(i, vcpu, kvm) { > > > > - if (vcpu->cpu != freq->cpu) > > > > + if (vcpu->cpu != cpu) > > > > continue; > > > > kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu); > > > > if (vcpu->cpu != smp_processor_id()) > > > > @@ -6728,8 +6721,24 @@ static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long va > > > > * guest context is entered kvmclock will be updated, > > > > * so the guest will not see stale values. > > > > */ > > > > - smp_call_function_single(freq->cpu, tsc_khz_changed, freq, 1); > > > > + smp_call_function_single(cpu, tsc_khz_changed, freq, 1); > > > > } > > > > +} > > > > + > > > > +static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val, > > > > + void *data) > > > > +{ > > > > + struct cpufreq_freqs *freq = data; > > > > + int cpu; > > > > + > > > > + if (val = CPUFREQ_PRECHANGE && freq->old > freq->new) > > > > + return 0; > > > > + if (val = CPUFREQ_POSTCHANGE && freq->old < freq->new) > > > > + return 0; > > > > + > > > > + for_each_cpu(cpu, freq->policy->cpus) > > > > + __kvmclock_cpufreq_notifier(freq, cpu); > > > > + > > > > return 0; > > > > } > > > > > > > > > > Then why to we pretend otherwise here? > > > > My intention was to not add any bug here because of lack of my > > knowledge of the architecture in question and so I tried to be safe. > > > > If you guys think the behavior should be same here as of the tsc, then > > we can add similar checks here. > > I am rebasing this patch over Rafael's patch [1] and wondering if I > should change anything here. I guess please repost when my patch makes it into linux-next. > [1] https://lore.kernel.org/lkml/38900622.ao2n2t5aPS@kreacher/ 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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 A22F6C282CE for ; Wed, 24 Apr 2019 07:27:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 6CF66218D3 for ; Wed, 24 Apr 2019 07:27:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LoTv+r2R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6CF66218D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=INfkhrGLjrcMyx6nCGjOwDoP4XZw8A8LaTsAjMxd6lg=; b=LoTv+r2RDI6/E3 Wv6/K84wO86pMskJrJpU03L1JHPJqdHKOj4sQa34oqPR4rThRzatHYD9B0UtH6e8atOssK2IolwZa /Jd6z5k8d0odcs6DXOZ5jlc4Jcoxx5ZyQXocCZqjggKTcBEssbR6Ue4RWuXbngEbtDnZurzHWT4iG i9+mtR3IvG2FUx0VN6ZwSiPC3qJPmrjoX+4fGLuPMTkBp+epih0xMUumGmR9yf4h3j5KrirLKkixD QOkq7euFRoJiCJky4gXqEv4dg6WUPXQaNRrEkcnvPuVUd6ScQSGNB9vn03TGjhb7xQsWNXDCkExZR wOALUK7Sez5DhnYmjBww==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJCJ9-0002UY-P9; Wed, 24 Apr 2019 07:27:07 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJCJ6-0002TF-3b for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 07:27:05 +0000 Received: by mail-ot1-f66.google.com with SMTP id g8so1287975otk.8 for ; Wed, 24 Apr 2019 00:27:03 -0700 (PDT) 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=uLNO+ALEpjn7XZDs/HjjZU+KRBu1qko3HM25uVzxfDc=; b=mnnR84XJYufvmiALA6pMnzmXtpmSG9LIigCUJJjUD+uHKO0udAAXO6L4bGeW57CItc ZzP7dWpACCDYXPWOogNpyHBV+2zEYjFL+SxUnXuFejYgZS4hXDn3FM7Bd3+ZxiOC7lTP 6FahGFL+Xpu1HyQ8SKQqRmYL8lq5yte8W5ip5G/YWjjCWcUjfgbhQ+syfDr05GYLm9Ld KKXUHSWHh25f95JD33Z/UTvW4pwm2V50Hh+GHSpXh+l8kEk8qaGQFVENSKSV9mkI2LWl wfEl5Hd7kwnJ+v3aqmi8vtmaMtI1iYW8LJEP6pCnKJD3XwapVblLpxmNSTN/z5U5rQb2 u6GA== X-Gm-Message-State: APjAAAW2lKAzj0qnnB40CtEckNR4gWgog8toegTBIVbdsQlxJuLVHDPm swQ5uj3kgCzmOpbzOgRsCm49THm7F5yRZQEL+tg= X-Google-Smtp-Source: APXvYqxyJrPNyV1aF82bL58Ait5kA70e7vPVXRilnf06niz6tAVSDHy39L3jZG3x8lr63UeZyYjasO/vFmrE+ISSHf4= X-Received: by 2002:a9d:7a50:: with SMTP id z16mr17331301otm.363.1556090822516; Wed, 24 Apr 2019 00:27:02 -0700 (PDT) MIME-Version: 1.0 References: <1eb27e3bbcbb2c67e6eadc0893c9b41e5d76894b.1553057341.git.viresh.kumar@linaro.org> <20190321114535.GM6058@hirez.programming.kicks-ass.net> <20190322061957.hzhnlbmnkpuqviiv@vireshk-i7> <20190424064753.lwfsdeodncaai5oz@vireshk-i7> In-Reply-To: <20190424064753.lwfsdeodncaai5oz@vireshk-i7> From: "Rafael J. Wysocki" Date: Wed, 24 Apr 2019 09:26:50 +0200 Message-ID: Subject: Re: [PATCH V3] cpufreq: Call transition notifier only once for each policy To: Viresh Kumar X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_002704_148584_4DFCBFB8 X-CRM114-Status: GOOD ( 20.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vincent Guittot , kvm@vger.kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Peter Zijlstra , Linux PM , the arch/x86 maintainers , Rafael Wysocki , Russell King , Linux Kernel Mailing List , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , sparclinux@vger.kernel.org, Paolo Bonzini , Thomas Gleixner , "David S. Miller" , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Apr 24, 2019 at 8:48 AM Viresh Kumar wrote: > > On 22-03-19, 11:49, Viresh Kumar wrote: > > On 21-03-19, 12:45, Peter Zijlstra wrote: > > > On Wed, Mar 20, 2019 at 10:22:23AM +0530, Viresh Kumar wrote: > > > > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > > > index 65e4559eef2f..1ac8c710cccc 100644 > > > > --- a/arch/x86/kvm/x86.c > > > > +++ b/arch/x86/kvm/x86.c > > > > @@ -6649,10 +6649,8 @@ static void kvm_hyperv_tsc_notifier(void) > > > > } > > > > #endif > > > > > > > > -static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val, > > > > - void *data) > > > > +static void __kvmclock_cpufreq_notifier(struct cpufreq_freqs *freq, int cpu) > > > > { > > > > - struct cpufreq_freqs *freq = data; > > > > struct kvm *kvm; > > > > struct kvm_vcpu *vcpu; > > > > int i, send_ipi = 0; > > > > @@ -6696,17 +6694,12 @@ static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long va > > > > * > > > > */ > > > > > > > > - if (val == CPUFREQ_PRECHANGE && freq->old > freq->new) > > > > - return 0; > > > > - if (val == CPUFREQ_POSTCHANGE && freq->old < freq->new) > > > > - return 0; > > > > - > > > > - smp_call_function_single(freq->cpu, tsc_khz_changed, freq, 1); > > > > + smp_call_function_single(cpu, tsc_khz_changed, freq, 1); > > > > > > > > spin_lock(&kvm_lock); > > > > list_for_each_entry(kvm, &vm_list, vm_list) { > > > > kvm_for_each_vcpu(i, vcpu, kvm) { > > > > - if (vcpu->cpu != freq->cpu) > > > > + if (vcpu->cpu != cpu) > > > > continue; > > > > kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu); > > > > if (vcpu->cpu != smp_processor_id()) > > > > @@ -6728,8 +6721,24 @@ static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long va > > > > * guest context is entered kvmclock will be updated, > > > > * so the guest will not see stale values. > > > > */ > > > > - smp_call_function_single(freq->cpu, tsc_khz_changed, freq, 1); > > > > + smp_call_function_single(cpu, tsc_khz_changed, freq, 1); > > > > } > > > > +} > > > > + > > > > +static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val, > > > > + void *data) > > > > +{ > > > > + struct cpufreq_freqs *freq = data; > > > > + int cpu; > > > > + > > > > + if (val == CPUFREQ_PRECHANGE && freq->old > freq->new) > > > > + return 0; > > > > + if (val == CPUFREQ_POSTCHANGE && freq->old < freq->new) > > > > + return 0; > > > > + > > > > + for_each_cpu(cpu, freq->policy->cpus) > > > > + __kvmclock_cpufreq_notifier(freq, cpu); > > > > + > > > > return 0; > > > > } > > > > > > > > > > Then why to we pretend otherwise here? > > > > My intention was to not add any bug here because of lack of my > > knowledge of the architecture in question and so I tried to be safe. > > > > If you guys think the behavior should be same here as of the tsc, then > > we can add similar checks here. > > I am rebasing this patch over Rafael's patch [1] and wondering if I > should change anything here. I guess please repost when my patch makes it into linux-next. > [1] https://lore.kernel.org/lkml/38900622.ao2n2t5aPS@kreacher/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel