linux/include/linux/psi_types.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_PSI_TYPES_H
#define _LINUX_PSI_TYPES_H

#include <linux/kthread.h>
#include <linux/seqlock.h>
#include <linux/types.h>
#include <linux/kref.h>
#include <linux/wait.h>

#ifdef CONFIG_PSI

/* Tracked task states */
enum psi_task_count {};

/* Task state bitmasks */
#define TSK_IOWAIT
#define TSK_MEMSTALL
#define TSK_RUNNING
#define TSK_MEMSTALL_RUNNING

/* Only one task can be scheduled, no corresponding task count */
#define TSK_ONCPU

/* Resources that workloads could be stalled on */
enum psi_res {};

/*
 * Pressure states for each resource:
 *
 * SOME: Stalled tasks & working tasks
 * FULL: Stalled tasks & no working tasks
 */
enum psi_states {};

/* Use one bit in the state mask to track TSK_ONCPU */
#define PSI_ONCPU

/* Flag whether to re-arm avgs_work, see details in get_recent_times() */
#define PSI_STATE_RESCHEDULE

enum psi_aggregators {};

struct psi_group_cpu {};

/* PSI growth tracking window */
struct psi_window {};

struct psi_trigger {};

struct psi_group {};

#else /* CONFIG_PSI */

#define NR_PSI_RESOURCES

struct psi_group { };

#endif /* CONFIG_PSI */

#endif /* _LINUX_PSI_TYPES_H */