Received: by 10.223.176.5 with SMTP id f5csp454237wra; Fri, 9 Feb 2018 01:42:46 -0800 (PST) X-Google-Smtp-Source: AH8x227bQqprR9lUBOqDLpHJPbBinV7F28A/Mk8ER6fGLwgMYtnJav4g2+ELrV1iOGrPEqsrodIG X-Received: by 10.101.73.143 with SMTP id r15mr1856862pgs.161.1518169366027; Fri, 09 Feb 2018 01:42:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518169365; cv=none; d=google.com; s=arc-20160816; b=acHoLQiyC41yT9W2xLok0dTunZ3o2MvVPVV+bR8xXIwTC5qr9BPLwFeOgHSBYQA+e+ l9esXXhEPdf1gLJK9LYC3L2r2kNSkmmM08XP3r9TvPoEso7NNwW5NcQ7Nb7KCcZ1bPTw 5tML90s3Rz8U0F1BrqNbqm9yRIhCx5ce1aAfkMtVA6gXqAqziwkTp1rmce7DGYr7Zu1C 1kqXyRAmT3vDZki4Nv+fAvIcKVzMKsKNFpGpMHt92TJBfzXPwS8c2ANTxiztMUlaX5Iz VXIQOaJSN7NqdhBydPrnuJbXfsDbWDNBfyli2cP9sDPYGYqjTnA8wrwU2nDask4yoDE0 UkKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=T3AybBChf+7cWcGikf27/O3BsVUlmpgglthRobmguTk=; b=fKZr4WclZP8hog50hZmlvTnARG5hb6lzr+3YjNlew5m4vXhMW4TFyqPNwz+M15KkGb OQQYPUFngdCecQ88HCjgIE0kJL/03pkzzRevWHNH7sAVfsG+aEUSLWpV17k1GTxz6/AV DdCJwrcPuNnMGHWjGcIXclIQKKzMaSa+NfdQaZvs7nx4V5u/acypVNSufgnTvggRVsV5 t4H1U85udmmPET+NsPjz0q1hptchbsA5B1mHeWRUDysdwfTmJWJKQQDeCli/x7uGcbd2 PNlQNk5PsGP5843lxwT4XVSYe74IrI5i6cXMYqprPnnHgqxlO678YRDAxBmDyOKMJmNT YXDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QcN/HNYD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si1134621pgp.805.2018.02.09.01.42.29; Fri, 09 Feb 2018 01:42:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QcN/HNYD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751057AbeBIJlG (ORCPT + 99 others); Fri, 9 Feb 2018 04:41:06 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:37422 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbeBIJlD (ORCPT ); Fri, 9 Feb 2018 04:41:03 -0500 Received: by mail-pl0-f66.google.com with SMTP id ay8so1231225plb.4 for ; Fri, 09 Feb 2018 01:41:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=T3AybBChf+7cWcGikf27/O3BsVUlmpgglthRobmguTk=; b=QcN/HNYDFMQKq/nUX5Pmr0tyrUIWISCBg9TnR04F97MkOj/7DJwYZVTajn9YGWXCkA quN7Nhs12jlBkECgwykiGeFyhGKOSp154sJh197NIL0K5aT9Ks3x29NPAYn1Dc+NXVFR kI5IBhL/4+ft4+EeOkJh929A497/9SvCRgGxg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=T3AybBChf+7cWcGikf27/O3BsVUlmpgglthRobmguTk=; b=sxiA9j67kl1hKawyBVZhaF5GHLHo/6O+mHVrs1civsmKuVBDzuw4BLG7iBha/P1VDy 40gxJQwr060PUMqFieOa2ld2s4hMhqEN+tcY7SGiE69SmiDKQILVHUNhPy6L03S6HPPG m56DqoIba8ySw3a42Dyg5xLBnkVF+k4v0N+rE0p4VOT0FwX1uhiqy5UoQ6te1FsrBVfD kmvBWJgT3YR35LF/EVzesMDwYBzKUcOwxh4g5pRU8Ex2Wn3gg9OV6nbWeNI1I0UHrDZA TbVVvyv47Q0hZ/asIJldAqhXAQVGZ1z1k8BPSUfwVovjczMqtzGxv/EuDHqeewseNg1E 3jOw== X-Gm-Message-State: APf1xPB/e0CMYosnKWMDZdb6QjZdPfzaGXiZGV/CnbPsGC66OitBKm0P jKVi+Fj78lAquvekrYmXYWbKmA== X-Received: by 2002:a17:902:7889:: with SMTP id q9-v6mr1999767pll.114.1518169262830; Fri, 09 Feb 2018 01:41:02 -0800 (PST) Received: from localhost ([122.172.61.199]) by smtp.gmail.com with ESMTPSA id i14sm4137814pgv.40.2018.02.09.01.41.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 01:41:02 -0800 (PST) Date: Fri, 9 Feb 2018 15:11:00 +0530 From: Viresh Kumar To: Daniel Lezcano Cc: edubezval@gmail.com, kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, linux-kernel@vger.kernel.org, Zhang Rui , Javi Merino , "open list:THERMAL" Subject: Re: [PATCH 5/8] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver Message-ID: <20180209094100.GM28462@vireshk-i7> References: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> <1516721671-16360-6-git-send-email-daniel.lezcano@linaro.org> <20180207091231.GQ28462@vireshk-i7> <54759b82-29e9-f376-bbe8-dcf683ed0cce@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54759b82-29e9-f376-bbe8-dcf683ed0cce@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07-02-18, 11:34, Daniel Lezcano wrote: > On 07/02/2018 10:12, Viresh Kumar wrote: > > What about cpuidle_cooling_unregister() ? > > The unregister function is not needed because cpuidle can't be unloaded. > The cpuidle cooling device is registered after the cpuidle successfully > initialized itself, there is no error path. Okay, then there are two more things here. First, you don't need a kref in your patch and simple counter should be used instead, as kref is obviously more heavy to be used for the single error path here. Secondly, what about CPU hotplug ? For example, the cpu-freq cooling device gets removed currently if all CPUs of a cluster are hotplugged-out. But with your code, even if the CPUs are gone, their cpu-idle cooling device will stay. -- viresh