Skip to content

Commit 1193829

Browse files
yangyang20220519torvalds
authored andcommitted
delayacct: cleanup flags in struct task_delay_info and functions use it
Flags in struct task_delay_info is used to distinguish the difference between swapin and blkio delay acountings. But after patch "delayacct: support swapin delay accounting for swapping without blkio", there is no need to do that since swapin and blkio delay accounting use their own functions. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Yang Yang <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Zeal Robot <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 82065b7 commit 1193829

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

include/linux/delayacct.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#ifdef CONFIG_TASK_DELAY_ACCT
1313
struct task_delay_info {
1414
raw_spinlock_t lock;
15-
unsigned int flags; /* Private per-task flags */
1615

1716
/* For each stat XXX, add following, aligned appropriately
1817
*
@@ -74,18 +73,6 @@ extern void __delayacct_thrashing_end(void);
7473
extern void __delayacct_swapin_start(void);
7574
extern void __delayacct_swapin_end(void);
7675

77-
static inline void delayacct_set_flag(struct task_struct *p, int flag)
78-
{
79-
if (p->delays)
80-
p->delays->flags |= flag;
81-
}
82-
83-
static inline void delayacct_clear_flag(struct task_struct *p, int flag)
84-
{
85-
if (p->delays)
86-
p->delays->flags &= ~flag;
87-
}
88-
8976
static inline void delayacct_tsk_init(struct task_struct *tsk)
9077
{
9178
/* reinitialize in case parent's non-null pointer was dup'ed*/
@@ -184,10 +171,6 @@ static inline void delayacct_swapin_end(void)
184171
}
185172

186173
#else
187-
static inline void delayacct_set_flag(struct task_struct *p, int flag)
188-
{}
189-
static inline void delayacct_clear_flag(struct task_struct *p, int flag)
190-
{}
191174
static inline void delayacct_init(void)
192175
{}
193176
static inline void delayacct_tsk_init(struct task_struct *tsk)

0 commit comments

Comments
 (0)