From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Dongdong Yang <contribute.kernel@gmail.com>,
gregkh@linuxfoundation.org, rjw@rjwysocki.net,
viresh.kumar@linaro.org, mingo@redhat.com, peterz@infradead.org,
juri.lelli@redhat.com, vincent.guittot@linaro.org,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
linux-pm@vger.kernel.org, yangdongdong@xiaomi.com,
tanggeliang@xiaomi.com, taojun@xiaomi.com, huangqiwu@xiaomi.com,
rocking@linux.alibaba.com, fengwei@xiaomi.com,
zhangguoquan@xiaomi.com, gulinghua@xiaomi.com, duhui@xiaomi.com
Subject: Re: [PATCH v2] sched: Provide USF for the portable equipment.
Date: Fri, 31 Jul 2020 16:25:56 +0200 [thread overview]
Message-ID: <67e5566b-2ec5-0a1d-87e1-88e90a8fa715@arm.com> (raw)
In-Reply-To: <e992fea6ad249694e615640862a28346936f8844.1596196062.git.yangdongdong@xiaomi.com>
On 31/07/2020 14:46, Dongdong Yang wrote:
> From: Dongdong Yang <yangdongdong@xiaomi.com>
[...]
> + if (unlikely(usf_vdev.enable_debug))
> + trace_printk
> + ("%s: cpu_id=%d non_ux=%d usf_up=%d usf_down=%d util=%lu\n",
> + USF_TAG, cpuid, usf_vdev.usf_non_ux,
> + usf_vdev.usf_up_l0, usf_vdev.usf_down, *util);
trace_printk in code ?
> +static int usf_lcd_notifier(struct notifier_block *nb,
> + unsigned long val, void *data)
> +{
> + struct fb_event *evdata = data;
> + unsigned int blank;
> +
> + if (!evdata)
> + return 0;
> +
> + if (val != FB_EVENT_BLANK)
> + return 0;
> +
> + if (evdata->data && val == FB_EVENT_BLANK) {
> + blank = *(int *)(evdata->data);
> +
> + switch (blank) {
> + case FB_BLANK_POWERDOWN:
> + usf_vdev.is_screen_on = 0;
> + if (usf_vdev.sysctl_sched_usf_non_ux != 0)
> + static_branch_enable(&adjust_task_pred_set);
> + else
> + static_branch_disable(&adjust_task_pred_set);
> +
> + break;
> +
> + case FB_BLANK_UNBLANK:
> + usf_vdev.is_screen_on = 1;
> + if (usf_vdev.sysctl_sched_usf_up_l0 != 0 ||
> + usf_vdev.sysctl_sched_usf_down != 0)
> + static_branch_enable(&adjust_task_pred_set);
> + else
> + static_branch_disable(&adjust_task_pred_set);
> + break;
> + default:
> + break;
> + }
> +
> + usf_vdev.is_sched_usf_enabled = 1;
> + if (usf_vdev.enable_debug)
> + trace_printk("%s : usf_vdev.is_screen_on:%d\n",
> + __func__, usf_vdev.is_screen_on);
> + }
> + return NOTIFY_OK;
> +}
> +
> +static struct notifier_block usf_lcd_nb = {
> + .notifier_call = usf_lcd_notifier,
> + .priority = INT_MAX,
> +};
Looks like those notifications should enable/disable the schedutil
extension adjust_task_pred_demand(). Who's calling them?
The 3 sched_usf_FOO sys files somehow have an influence here too. How
should this work?
I see a fb_register_client() in intera_monitor_init further below.
[...]
> +usf_attr_rw(sched_usf_up_l0_r);
> +usf_attr_rw(sched_usf_down_r);
> +usf_attr_rw(sched_usf_non_ux_r);
What can I do with these three files? What do they stand for?
root@h620:/sys/devices/system/cpu/sched_usf# ls
sched_usf_down_r sched_usf_non_ux_r sched_usf_up_l0_r
[...]
> +static int __init intera_monitor_init(void)
> +{
> + int res = -1;
> + struct attribute_group *attr_group;
> +
> + res = fb_register_client(&usf_lcd_nb);
> + if (res < 0) {
> + pr_err("Failed to register usf_lcd_nb!\n");
> + return res;
[...]
next prev parent reply other threads:[~2020-07-31 14:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-31 12:46 [PATCH v2] Provide USF for the portable equipment Dongdong Yang
2020-07-31 12:46 ` [PATCH v2] sched: " Dongdong Yang
2020-07-31 13:20 ` Greg KH
2020-07-31 13:22 ` Greg KH
2020-07-31 13:28 ` Greg KH
2020-07-31 14:25 ` Dietmar Eggemann [this message]
2020-08-01 8:13 ` [PATCH v2] " Christoph Hellwig
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=67e5566b-2ec5-0a1d-87e1-88e90a8fa715@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=bsegall@google.com \
--cc=contribute.kernel@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=duhui@xiaomi.com \
--cc=fengwei@xiaomi.com \
--cc=gregkh@linuxfoundation.org \
--cc=gulinghua@xiaomi.com \
--cc=huangqiwu@xiaomi.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=rocking@linux.alibaba.com \
--cc=rostedt@goodmis.org \
--cc=tanggeliang@xiaomi.com \
--cc=taojun@xiaomi.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=yangdongdong@xiaomi.com \
--cc=zhangguoquan@xiaomi.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;
as well as URLs for NNTP newsgroup(s).