[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df7e04d86dd64dc85125d536434d93bab3d6314d.camel@intel.com>
Date: Tue, 19 Apr 2022 21:54:26 +0800
From: Zhang Rui <rui.zhang@...el.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>,
Junwen Wu <wudaemon@....com>, rafael@...nel.org,
amitk@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH v1] thermal/core: change mm alloc method to avoid kernel
warning
CC Viresh.
On Tue, 2022-04-19 at 11:14 +0200, Daniel Lezcano wrote:
> On 19/04/2022 10:48, Zhang Rui wrote:
> > On Sun, 2022-04-17 at 12:56 +0000, Junwen Wu wrote:
> > > Very high cooling device max state value makes cooling device
> > > stats
> > > buffer allocation fails,like below.Using kzvalloc instead of
> > > kzalloc
> > > can avoid this issue.
> >
> > When a cooling device has big max_state, this patch can get ride of
> > the
> > warning here, but still we end up with the read failure of the
> > trans_table in sysfs because it is larger than PAGE_SIZE.
> >
> > $ cat /sys/class/thermal/cooling_device8/stats/trans_table
> > cat: /sys/class/thermal/cooling_device8/stats/trans_table: File too
> > large
> >
> > IMO, unless we can fix both places, I'd suggest we skip allocating
> > and
> > creating the broken trans_table attr. Like a prototype patch below
>
> Why not create a thermal debugfs with real useful information and
> get
> rid of this broken code ?
The idea looks good to me.
thanks,
rui
Powered by blists - more mailing lists