From: Yue Hu <zbestahu@gmail.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "rui.zhang@intel.com" <rui.zhang@intel.com>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"amit.kucheria@verdurent.com" <amit.kucheria@verdurent.com>,
"viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"huyue2@yulong.com" <huyue2@yulong.com>,
"zhangwen@yulong.com" <zhangwen@yulong.com>
Subject: Re: [PATCH] thermal: sysfs: Fall back to vmalloc() for cooling device's statistics
Date: Fri, 21 Aug 2020 17:06:27 +0800 [thread overview]
Message-ID: <20200821170627.00003d5e.zbestahu@gmail.com> (raw)
In-Reply-To: <7a0c2e488e024c0694fd730f95ba98fb@AcuMS.aculab.com>
On Fri, 21 Aug 2020 08:39:45 +0000
David Laight <David.Laight@ACULAB.COM> wrote:
> From: Yue Hu
> > Sent: 21 August 2020 03:44
> >
> > From: Yue Hu <huyue2@yulong.com>
> >
> > 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.
> > That is so large to trigger kmalloc() warning.
>
> I can't help feeling that there is an 'adequate' implementation
> that doesn't require anywhere near 1MB of memory.
However, it should be a potential issue due to what i described above, rt?
Thx.
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
prev parent reply other threads:[~2020-08-21 9:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 2:44 [PATCH] thermal: sysfs: Fall back to vmalloc() for cooling device's statistics Yue Hu
2020-08-21 5:00 ` Viresh Kumar
2020-08-21 7:02 ` Amit Kucheria
2020-08-21 8:39 ` David Laight
2020-08-21 9:06 ` Yue Hu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200821170627.00003d5e.zbestahu@gmail.com \
--to=zbestahu@gmail.com \
--cc=David.Laight@ACULAB.COM \
--cc=amit.kucheria@verdurent.com \
--cc=daniel.lezcano@linaro.org \
--cc=huyue2@yulong.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=viresh.kumar@linaro.org \
--cc=zhangwen@yulong.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox