[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140730062415.GA5100@gchen.bj.intel.com>
Date: Wed, 30 Jul 2014 02:24:15 -0400
From: "Chen, Gong" <gong.chen@...ux.intel.com>
To: Borislav Petkov <bp@...en8.de>
Cc: linux-kernel@...r.kernel.org, mingo@...nel.org, tglx@...utronix.de,
paulus@...ba.org, benh@...nel.crashing.org, tony.luck@...el.com,
hpa@...or.com, jkosina@...e.cz, rafael.j.wysocki@...el.com,
linux@....linux.org.uk, ralf@...ux-mips.org,
schwidefsky@...ibm.com, davem@...emloft.net,
viro@...iv.linux.org.uk, fweisbec@...il.com, cl@...ux.com,
akpm@...ux-foundation.org, axboe@...nel.dk,
JBottomley@...allels.com, neilb@...e.de,
christoffer.dall@...aro.org, rostedt@...dmis.org, rric@...nel.org,
gregkh@...uxfoundation.org, mhocko@...e.cz, david@...morbit.com
Subject: Re: [RFC PATCH v1 13/70] x86, x2apic_cluster: _FROZEN Cleanup
On Wed, Jul 23, 2014 at 10:36:28PM +0200, Borislav Petkov wrote:
> /*
> * At CPU state changes, update the x2apic cluster sibling info.
> */
> @@ -151,9 +166,14 @@ static int
> update_clusterinfo(struct notifier_block *nfb, unsigned long action, void *hcpu)
> {
> unsigned int this_cpu = (unsigned long)hcpu;
> - unsigned int cpu;
> int err = 0;
>
> + if (action & CPU_TASKS_FROZEN) {
> + if ((action & ~CPU_TASKS_FROZEN) == CPU_UP_CANCELED)
> + __update_clusterinfo(this_cpu);
> + return NOTIFY_OK;
> + }
> +
Hi, Boris
Here you assume once the action contains FROZEN flag, it will return
NOTIFY_OK. It looks like not quite comply with original logic. Once
new FROZEN logic is added, we have to update this code again. How
about using following code snippet:
+ if ((action & CPU_TASKS_FROZEN) &&
+ ((action & ~CPU_TASKS_FROZEN) == CPU_UP_CANCELED)) {
+ __update_clusterinfo(this_cpu);
+ return NOTIFY_OK;
+ }
+
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists