Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756334AbcCQLg2 (ORCPT ); Thu, 17 Mar 2016 07:36:28 -0400 Received: from casper.infradead.org ([85.118.1.10]:57207 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755912AbcCQLg0 (ORCPT ); Thu, 17 Mar 2016 07:36:26 -0400 Date: Thu, 17 Mar 2016 12:36:22 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" Cc: Linux PM list , Juri Lelli , Steve Muckle , ACPI Devel Maling List , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Vincent Guittot , Michael Turquette , Ingo Molnar Subject: Re: [PATCH v5 7/7][Update] cpufreq: schedutil: New governor based on scheduler utilization data Message-ID: <20160317113622.GS6344@twins.programming.kicks-ass.net> References: <2495375.dFbdlAZmA6@vostro.rjw.lan> <4088601.C2vItRYpQn@vostro.rjw.lan> <1711281.bPmSjlBT7c@vostro.rjw.lan> <18957412.GBWZqUOZtk@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18957412.GBWZqUOZtk@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 635 Lines: 19 On Thu, Mar 17, 2016 at 01:01:45AM +0100, Rafael J. Wysocki wrote: > + } else if (sg_policy->next_freq != next_freq) { > + sg_policy->work_cpu = smp_processor_id(); > + irq_work_queue(&sg_policy->irq_work); > + } > +} > +static void sugov_irq_work(struct irq_work *irq_work) > +{ > + struct sugov_policy *sg_policy; > + > + sg_policy = container_of(irq_work, struct sugov_policy, irq_work); > + schedule_work_on(sg_policy->work_cpu, &sg_policy->work); > +} Not sure I see the point of ->work_cpu, irq_work_queue() does guarantee the same CPU, so the above is identical to: schedule_work_on(smp_processor_id(), &sq_policy->work);