From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752482AbcBOIUc (ORCPT ); Mon, 15 Feb 2016 03:20:32 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35899 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752225AbcBOIU3 (ORCPT ); Mon, 15 Feb 2016 03:20:29 -0500 Date: Mon, 15 Feb 2016 13:50:21 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM list , Linux Kernel Mailing List , Juri Lelli Subject: Re: [PATCH 2/9] cpufreq: governor: Avoid atomic operations in hot paths Message-ID: <20160215082021.GG6334@vireshk-i7> References: <3329748.lhJgppdTt9@vostro.rjw.lan> <8782327.qY15U8QUIT@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8782327.qY15U8QUIT@vostro.rjw.lan> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15-02-16, 02:13, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Rework the handling of work items by dbs_update_util_handler() and > dbs_work_handler() so the former (which is executed in scheduler > paths) only uses atomic operations when absolutely necessary. That > is, when the policy is shared and dbs_update_util_handler() has > already decided that this is the time to queue up a work item. > > In particular, this avoids the atomic ops entirely on platforms where > policy objects are never shared. > > Signed-off-by: Rafael J. Wysocki > --- > > This is a new version of https://patchwork.kernel.org/patch/8291051/ . > > Changes from the previous version: > - Added a new "is_shared" field to struct policy_dbs_info to be set for > shared policies to avoid evaluating cpumask_weight() every time > dbs_update_util_handler() decides to take a sample. Acked-by: Viresh Kumar -- viresh