Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp160346pxa; Wed, 26 Aug 2020 21:05:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLUDZAOqdEJYEXCmSPgV+/WNMhuyinYayJtFjK8QajRyGiaHNkL3Da5SOTarFeMp5zIMzx X-Received: by 2002:a17:906:1351:: with SMTP id x17mr18023467ejb.528.1598501108596; Wed, 26 Aug 2020 21:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598501108; cv=none; d=google.com; s=arc-20160816; b=cwVlRVYCPJzA28SvqaRtUrBg7NMMGeuuljWDVuZH8DfEot1xTpKchI7Bk0kPmOErYW w3U3t9gE6+8nlT8fAQ9jQWUlcPfD7Qf19zPaPwvhFC1n1blJicJcPwuz2JlsCWIoxTeH VcdM0y+NPCFlVfLAIV7sP7+auM8SxRc34l807NVLIA8Yw4FfH3MJiC4t3tcCTJUaAftX RMzVjjJdiuAMTcbmdfDlYzV1/VhqMfHjwwBYRqO1RRHY/MdwA3VS74LziY7QN8K0YVeb 7qdly4tSYAreSAc4upj4DlC9Q+8GGEMYBRzFkQe6AxPX87ok0MwE+j9F6+0qucnoAihU gobg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=6bQeuePNqH7dWbqUFgjlTSNlzBof5RgofuNEIyHakwM=; b=Vm3IGyAvqbZ/YoiDp8biBzTcemIpOTko7KFREtpDsXWc83bcxuOY0Y7OAtexjxWJZw R3ISWbD+YvV7IslVgi0+kE/qgeN0JCcafRzyNSK/1wDZE9WaVLt+AVxRo0XVEDLFfJLw nWc3YH1cLKSe3yUQ6KOK4uALwnzPxWthdvN9euzQi/Mh3Wb0ViMDruuj0RX+dtg3mpYX gZim+c4yfLifSZXqVLpqlITEwTjAesgyA7eyqxtNb2YAYnjsehRUaF1A0GOxw6qh5rPk FpvsinAUx39Jt5f8Ug6fl3RafcnBCHlBQdjncc1GGJi+9Tpm92YE8/GMwpCq+jRQaqcP Sp2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X3MR6zMd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si560352ejx.280.2020.08.26.21.04.45; Wed, 26 Aug 2020 21:05:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X3MR6zMd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726058AbgH0EDt (ORCPT + 99 others); Thu, 27 Aug 2020 00:03:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbgH0EDs (ORCPT ); Thu, 27 Aug 2020 00:03:48 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54AFBC0612A3; Wed, 26 Aug 2020 21:03:27 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id m8so2465100pfh.3; Wed, 26 Aug 2020 21:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6bQeuePNqH7dWbqUFgjlTSNlzBof5RgofuNEIyHakwM=; b=X3MR6zMdfOgPqvRfgQkzGhLn/dxi02axDYvVL7GX/lmX+cA98U0F7qPCwN5R826MPt P6f278VM9YOweJuu39pPhgqodUBu+ASdBdcZZwSSfYTgdzpBm5DLE9iwNIUmdt9bZ/dU YgTTt9tbCeTgNibdS+a4BNHlRVfY0bKqaX6Rpsnx70swdhJFBmB8FNDJ4upzP7eFStyf xTRKRq8CRQ35RLoLaC0Ct7s+xT4NSHWhCXZ9OAAXJeSZV6VnIddS8rQbEC2ylVXwzStu LUXFNe8kgTUMCa337MPXi93vLwJBUj2x8ZZM/unRuBZoYo6Dmnp2RCOohjZeV6HUmy90 VaHg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=6bQeuePNqH7dWbqUFgjlTSNlzBof5RgofuNEIyHakwM=; b=sW8nrtNQlFbJxeJ2BDWDdO4ry5+1oYO1+9RtIuYUElkuSQhb9ZGeW0LgS3sUSOb/A6 Z64oww97SZ5dlPTDfG8klgnQTR2Y0MYSkwgbNMtbpV+a2chQv2/c4UWn4FpxtwJvso0A l/sblpd9oBMwHFSoGdZZqFC4sD473BlqPh6YEyIhSqw5jbXTL/xmPUEzFFBAKCSdHmPH m38OpHCSmx4OLApUH5Gnbnhl4qepKJpBoGUdp+ojJRYcAyI3ORPj49MCJjkp/duPLGtF SlHCRfHWoQhBIvFQlSzw4hQfBmsh3u9P67OvTu8PHBvkjrNWKAxj/Zmb1Z64hGdZE80W PCTQ== X-Gm-Message-State: AOAM5330XpPh/wylHm26m9AatvXHN1KSFdtlXjfjOoMGmmS37+3D3YDB gRmTOjJuWsLsuf6gt8O2bpI= X-Received: by 2002:a65:6882:: with SMTP id e2mr13324535pgt.290.1598501005803; Wed, 26 Aug 2020 21:03:25 -0700 (PDT) Received: from localhost ([124.156.176.71]) by smtp.gmail.com with ESMTPSA id v78sm800705pfc.121.2020.08.26.21.03.23 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Aug 2020 21:03:25 -0700 (PDT) Date: Thu, 27 Aug 2020 12:03:27 +0800 From: Yue Hu To: Daniel Lezcano , viresh.kumar@linaro.org Cc: rui.zhang@intel.com, amit.kucheria@verdurent.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, huyue2@yulong.com, zbestahu@163.com Subject: Re: [PATCH] thermal: sysfs: fall back to vzalloc for cooling device's statistics Message-ID: <20200827120327.00003740.zbestahu@gmail.com> In-Reply-To: References: <20200818063005.13828-1-zbestahu@gmail.com> <40b69f97-46e5-d62e-0d2f-604dfd4dafa1@linaro.org> <20200826101319.00003048.zbestahu@gmail.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Aug 2020 11:19:02 +0200 Daniel Lezcano wrote: > Hi Yue, > > On 26/08/2020 04:13, Yue Hu wrote: > > On Mon, 24 Aug 2020 12:40:35 +0200 > > Daniel Lezcano wrote: > > > >> On 18/08/2020 08:30, Yue Hu wrote: > >>> From: Yue Hu > >>> > >>> We observed warning about kzalloc() when register thermal cooling device > >>> in backlight_device_register(). backlight display can be a cooling device > >>> since reducing screen brightness will can help reduce temperature. > >>> > >>> However, ->get_max_state of backlight will assign max brightness of 1024 > >>> to states. The memory size can be getting 1MB+ due to states * states. > >> > >> What are the benefits of a 1024 states cooling device ? Is the > >> difference noticeable with a such small step ? > > > > Okay, this issue is happened under MSM/Android platform. QCOM spmi wled driver > > will define the max brightness. We needs to fix the issue to get thermal statistics. > > Let me rephrase my questions: > > Don't you think there is something wrong in creating a 1024 x 1024 > matrix to show transitions ? > > What is the benefit of such stats ? > > What is the benefit of having a 1024 states cooling device ? Hi Daniel, Now, i'm just focus on removing the kernel warning based on current code logic. Commit 8ea229511e06 (thermal: Add cooling device's statistics in sysfs) added the thermal statistics by viresh and viresh gived the patch an acknowledgement in anther mail thread. Hi viresh, Could you review the patch again about the question above? Thank you. > > > >