mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 13:23:23 +01:00
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]>
This commit is contained in:
1 parent
82065b7266
commit
1193829da1
1 file changed
-17
@@ -12,7 +12,6 @@
|
||||
#ifdef CONFIG_TASK_DELAY_ACCT
|
||||
struct task_delay_info {
|
||||
raw_spinlock_t lock;
|
||||
unsigned int flags; /* Private per-task flags */
|
||||
|
||||
/* For each stat XXX, add following, aligned appropriately
|
||||
*
|
||||
@@ -74,18 +73,6 @@ extern void __delayacct_thrashing_end(void);
|
||||
extern void __delayacct_swapin_start(void);
|
||||
extern void __delayacct_swapin_end(void);
|
||||
|
||||
static inline void delayacct_set_flag(struct task_struct *p, int flag)
|
||||
{
|
||||
if (p->delays)
|
||||
p->delays->flags |= flag;
|
||||
}
|
||||
|
||||
static inline void delayacct_clear_flag(struct task_struct *p, int flag)
|
||||
{
|
||||
if (p->delays)
|
||||
p->delays->flags &= ~flag;
|
||||
}
|
||||
|
||||
static inline void delayacct_tsk_init(struct task_struct *tsk)
|
||||
{
|
||||
/* reinitialize in case parent's non-null pointer was dup'ed*/
|
||||
@@ -184,10 +171,6 @@ static inline void delayacct_swapin_end(void)
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void delayacct_set_flag(struct task_struct *p, int flag)
|
||||
{}
|
||||
static inline void delayacct_clear_flag(struct task_struct *p, int flag)
|
||||
{}
|
||||
static inline void delayacct_init(void)
|
||||
{}
|
||||
static inline void delayacct_tsk_init(struct task_struct *tsk)
|
||||
|
||||
Reference in new issue
Block a user