lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a316316a-f828-3a51-f6eb-18a31c8b4c35@huawei.com>
Date: Fri, 13 Sep 2024 17:57:28 +0800
From: zhengzucheng <zhengzucheng@...wei.com>
To: <mingo@...hat.com>, <peterz@...radead.org>, <juri.lelli@...hat.com>,
	<vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
	<rostedt@...dmis.org>, <bsegall@...gle.com>, <mgorman@...e.de>,
	<vschneid@...hat.com>, <gregkh@...uxfoundation.org>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] sched: Remove the check on the return value of
 sched_update_scaling()

Friendly ping. Any more question about this patch?

在 2024/8/12 20:08, Zheng Zucheng 写道:
> sched_update_scaling() always returns 0, so there's no need to check if
> sched_update_scaling() was successful.
>
> Fixes: 8a99b6833c88 ("sched: Move SCHED_DEBUG sysctl to debugfs")
> Signed-off-by: Zheng Zucheng <zhengzucheng@...wei.com>
> ---
>   kernel/sched/debug.c | 3 +--
>   kernel/sched/fair.c  | 4 +---
>   kernel/sched/sched.h | 2 +-
>   3 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
> index 845b79238398..87c683c8635f 100644
> --- a/kernel/sched/debug.c
> +++ b/kernel/sched/debug.c
> @@ -188,8 +188,7 @@ static ssize_t sched_scaling_write(struct file *filp, const char __user *ubuf,
>   		return -EINVAL;
>   
>   	sysctl_sched_tunable_scaling = scaling;
> -	if (sched_update_scaling())
> -		return -EINVAL;
> +	sched_update_scaling();
>   
>   	*ppos += cnt;
>   	return cnt;
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index efb2b3062179..b3d79b693021 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -954,7 +954,7 @@ struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq)
>    * Scheduling class statistics methods:
>    */
>   #ifdef CONFIG_SMP
> -int sched_update_scaling(void)
> +void sched_update_scaling(void)
>   {
>   	unsigned int factor = get_update_sysctl_factor();
>   
> @@ -962,8 +962,6 @@ int sched_update_scaling(void)
>   	(normalized_sysctl_##name = sysctl_##name / (factor))
>   	WRT_SYSCTL(sched_base_slice);
>   #undef WRT_SYSCTL
> -
> -	return 0;
>   }
>   #endif
>   #endif
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index 9373426d5aae..d8319e58a0c6 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -2054,7 +2054,7 @@ static inline void update_sched_domain_debugfs(void) { }
>   static inline void dirty_sched_domain_sysctl(int cpu) { }
>   #endif
>   
> -extern int sched_update_scaling(void);
> +extern void sched_update_scaling(void);
>   
>   static inline const struct cpumask *task_user_cpus(struct task_struct *p)
>   {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ