This removes the vtime_account_kernel() function in generic vtime
accounting. It's never used anymore.
Signed-off-by: Changbin Du <[email protected]>
---
kernel/sched/cputime.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index af7952f12e6c..29320e66abdc 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -709,18 +709,6 @@ static void __vtime_account_kernel(struct task_struct *tsk,
vtime_account_system(tsk, vtime);
}
-void vtime_account_kernel(struct task_struct *tsk)
-{
- struct vtime *vtime = &tsk->vtime;
-
- if (!vtime_delta(vtime))
- return;
-
- write_seqcount_begin(&vtime->seqcount);
- __vtime_account_kernel(tsk, vtime);
- write_seqcount_end(&vtime->seqcount);
-}
-
void vtime_user_enter(struct task_struct *tsk)
{
struct vtime *vtime = &tsk->vtime;
--
2.34.1
The vtime_account_idle() can also be removed. Will update this change.
On Thu, Apr 11, 2024 at 07:22:12PM +0800, Changbin Du wrote:
> This removes the vtime_account_kernel() function in generic vtime
> accounting. It's never used anymore.
>
> Signed-off-by: Changbin Du <[email protected]>
> ---
> kernel/sched/cputime.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
> index af7952f12e6c..29320e66abdc 100644
> --- a/kernel/sched/cputime.c
> +++ b/kernel/sched/cputime.c
> @@ -709,18 +709,6 @@ static void __vtime_account_kernel(struct task_struct *tsk,
> vtime_account_system(tsk, vtime);
> }
>
> -void vtime_account_kernel(struct task_struct *tsk)
> -{
> - struct vtime *vtime = &tsk->vtime;
> -
> - if (!vtime_delta(vtime))
> - return;
> -
> - write_seqcount_begin(&vtime->seqcount);
> - __vtime_account_kernel(tsk, vtime);
> - write_seqcount_end(&vtime->seqcount);
> -}
> -
> void vtime_user_enter(struct task_struct *tsk)
> {
> struct vtime *vtime = &tsk->vtime;
> --
> 2.34.1
>
--
Cheers,
Changbin Du