Squashed revert of CPU UID time commits
* Reverting the following wahoo commits to reduce merge conflicts with android-4.4-p * android-4.4-p has a more up to date version of these patches Revert "cpufreq: stats: optimize proc files" This reverts commitdf9e853de7. Revert "cpufreq: times: add text versions of uid concurrent_*_time files" This reverts commit09a579d84b. Revert "cpufreq_stats: Reset cpufreq_task_stats right after dup_task_struct" This reverts commit9fdce3a6ec. Revert "kernel: initialize and free cpufreq stats properly" This reverts commit990b5d6095. Revert "kernel: Fix massive cpufreq stats memory leaks" This reverts commit33d963afe6. Revert "cpufreq: stats: use seq iterator for large uid-related files" This reverts commit085b2438b2. Revert "cpufreq: stats: update uid data in acct_update_power" This reverts commitc2d219600e. Revert "ANDROID: cpufreq: change uid_cpupower to use u32" This reverts commit422d5f8279. Revert "STOPSHIP: ANDROID: cpufreq: concurrent_*_time P/H experiment" This reverts commit74e7c2c05e. Revert "ANDROID: cpufreq: Remove seq_printf from critical path" This reverts commit2b7f873be1. Revert "ANDROID: cpufreq: update conditions for recording cputime" This reverts commit3ef73b4845. Revert "ANDROID: cpufreq: uid_concurrent_policy_time" This reverts commit9892125368. Revert "ANDROID: cpufreq: uid_concurrent_active_time" This reverts commitc89e69136f. Revert "ANDROID: cpufreq: concurrent_policy_time by pid" This reverts commit7afc0cf002. Revert "ANDROID: cpufreq: concurrent_active_time by pid" This reverts commita88a869505. Revert "ANDROID: cpufreq: Add time_in_state to /proc/uid directories" This reverts commit0c042ef0b3. Revert "ANDROID: cpufreq: stats: Fix dead stats clearing timing" This reverts commit502920bb13. Revert "ANDROID: cpufreq: stats: Fix sleeping while atomic in cpufreq_task_stats_init" This reverts commit99735fa7c3. Revert "ANDROID: cpufreq: stats: Fix NULL policy scenarios" This reverts commita24d2dd696. Revert "ANDROID: cpufreq: stats: add per task/uid/freq/cluster stats" This reverts commitfc4ac15a00. Revert "proc: add null check in proc_uid_init" This reverts commitaaf63e5111. Revert "ANDROID: proc: Add /proc/uid directory" This reverts commit9ef787ad55. Revert "uid_sys_stats: fix overflow when io usage delta is negative" This reverts commit8e7913772d. Change-Id: I5fc16b03944fae9c2997192bfb842444c7142764
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,6 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/cpufreq.h>
|
||||
|
||||
#define UID_HASH_BITS 10
|
||||
DECLARE_HASHTABLE(hash_table, UID_HASH_BITS);
|
||||
@@ -187,14 +186,6 @@ static ssize_t uid_remove_write(struct file *file,
|
||||
kstrtol(end_uid, 10, &uid_end) != 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* TODO need to unify uid_sys_stats interface with uid_time_in_state.
|
||||
* Here we are reusing remove_uid_range to reduce the number of
|
||||
* sys calls made by userspace clients, remove_uid_range removes uids
|
||||
* from both here as well as from cpufreq uid_time_in_state
|
||||
*/
|
||||
cpufreq_task_stats_remove_uids(uid_start, uid_end);
|
||||
|
||||
rt_mutex_lock(&uid_lock);
|
||||
|
||||
for (; uid_start <= uid_end; uid_start++) {
|
||||
@@ -242,29 +233,13 @@ static void compute_uid_io_bucket_stats(struct io_stats *io_bucket,
|
||||
struct io_stats *io_last,
|
||||
struct io_stats *io_dead)
|
||||
{
|
||||
s64 delta;
|
||||
|
||||
delta = io_curr->read_bytes + io_dead->read_bytes -
|
||||
io_bucket->read_bytes += io_curr->read_bytes + io_dead->read_bytes -
|
||||
io_last->read_bytes;
|
||||
if (delta > 0)
|
||||
io_bucket->read_bytes += delta;
|
||||
|
||||
delta = io_curr->write_bytes + io_dead->write_bytes -
|
||||
io_bucket->write_bytes += io_curr->write_bytes + io_dead->write_bytes -
|
||||
io_last->write_bytes;
|
||||
if (delta > 0)
|
||||
io_bucket->write_bytes += delta;
|
||||
|
||||
delta = io_curr->rchar + io_dead->rchar - io_last->rchar;
|
||||
if (delta > 0)
|
||||
io_bucket->rchar += delta;
|
||||
|
||||
delta = io_curr->wchar + io_dead->wchar - io_last->wchar;
|
||||
if (delta > 0)
|
||||
io_bucket->wchar += delta;
|
||||
|
||||
delta = io_curr->fsync + io_dead->fsync - io_last->fsync;
|
||||
if (delta > 0)
|
||||
io_bucket->fsync += delta;
|
||||
io_bucket->rchar += io_curr->rchar + io_dead->rchar - io_last->rchar;
|
||||
io_bucket->wchar += io_curr->wchar + io_dead->wchar - io_last->wchar;
|
||||
io_bucket->fsync += io_curr->fsync + io_dead->fsync - io_last->fsync;
|
||||
|
||||
io_last->read_bytes = io_curr->read_bytes;
|
||||
io_last->write_bytes = io_curr->write_bytes;
|
||||
|
||||
@@ -24,7 +24,6 @@ proc-y += softirqs.o
|
||||
proc-y += namespaces.o
|
||||
proc-y += self.o
|
||||
proc-y += thread_self.o
|
||||
proc-y += uid.o
|
||||
proc-$(CONFIG_PROC_SYSCTL) += proc_sysctl.o
|
||||
proc-$(CONFIG_NET) += proc_net.o
|
||||
proc-$(CONFIG_PROC_KCORE) += kcore.o
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/flex_array.h>
|
||||
#include <linux/posix-timers.h>
|
||||
#include <linux/cpufreq.h>
|
||||
#ifdef CONFIG_HARDWALL
|
||||
#include <asm/hardwall.h>
|
||||
#endif
|
||||
@@ -2980,11 +2979,6 @@ static const struct pid_entry tgid_base_stuff[] = {
|
||||
REG("timers", S_IRUGO, proc_timers_operations),
|
||||
#endif
|
||||
REG("timerslack_ns", S_IRUGO|S_IWUGO, proc_pid_set_timerslack_ns_operations),
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
ONE("time_in_state", 0444, proc_time_in_state_show),
|
||||
ONE("concurrent_active_time", 0444, proc_concurrent_active_time_show),
|
||||
ONE("concurrent_policy_time", 0444, proc_concurrent_policy_time_show),
|
||||
#endif
|
||||
};
|
||||
|
||||
static int proc_tgid_base_readdir(struct file *file, struct dir_context *ctx)
|
||||
@@ -3370,11 +3364,6 @@ static const struct pid_entry tid_base_stuff[] = {
|
||||
REG("projid_map", S_IRUGO|S_IWUSR, proc_projid_map_operations),
|
||||
REG("setgroups", S_IRUGO|S_IWUSR, proc_setgroups_operations),
|
||||
#endif
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
ONE("time_in_state", 0444, proc_time_in_state_show),
|
||||
ONE("concurrent_active_time", 0444, proc_concurrent_active_time_show),
|
||||
ONE("concurrent_policy_time", 0444, proc_concurrent_policy_time_show),
|
||||
#endif
|
||||
};
|
||||
|
||||
static int proc_tid_base_readdir(struct file *file, struct dir_context *ctx)
|
||||
|
||||
@@ -256,11 +256,6 @@ static inline void proc_sys_init(void) { }
|
||||
static inline void sysctl_head_put(struct ctl_table_header *head) { }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* uid.c
|
||||
*/
|
||||
extern int proc_uid_init(void);
|
||||
|
||||
/*
|
||||
* proc_tty.c
|
||||
*/
|
||||
|
||||
@@ -182,7 +182,7 @@ void __init proc_root_init(void)
|
||||
proc_symlink("mounts", NULL, "self/mounts");
|
||||
|
||||
proc_net_init();
|
||||
proc_uid_init();
|
||||
|
||||
#ifdef CONFIG_SYSVIPC
|
||||
proc_mkdir("sysvipc", NULL);
|
||||
#endif
|
||||
|
||||
291
fs/proc/uid.c
291
fs/proc/uid.c
@@ -1,291 +0,0 @@
|
||||
/*
|
||||
* /proc/uid support
|
||||
*/
|
||||
|
||||
#include <linux/cpufreq.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/hashtable.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/slab.h>
|
||||
#include "internal.h"
|
||||
|
||||
struct proc_dir_entry *proc_uid;
|
||||
|
||||
#define UID_HASH_BITS 10
|
||||
|
||||
static DECLARE_HASHTABLE(proc_uid_hash_table, UID_HASH_BITS);
|
||||
|
||||
static DEFINE_RT_MUTEX(proc_uid_lock); /* proc_uid_hash_table */
|
||||
|
||||
struct uid_hash_entry {
|
||||
uid_t uid;
|
||||
struct hlist_node hash;
|
||||
};
|
||||
|
||||
/* Caller must hold proc_uid_lock */
|
||||
static bool uid_hash_entry_exists(uid_t uid)
|
||||
{
|
||||
struct uid_hash_entry *entry;
|
||||
|
||||
hash_for_each_possible(proc_uid_hash_table, entry, hash, uid) {
|
||||
if (entry->uid == uid)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void proc_register_uid(kuid_t kuid)
|
||||
{
|
||||
struct uid_hash_entry *entry;
|
||||
bool exists;
|
||||
uid_t uid = from_kuid_munged(current_user_ns(), kuid);
|
||||
|
||||
rt_mutex_lock(&proc_uid_lock);
|
||||
exists = uid_hash_entry_exists(uid);
|
||||
rt_mutex_unlock(&proc_uid_lock);
|
||||
if (exists)
|
||||
return;
|
||||
|
||||
entry = kzalloc(sizeof(struct uid_hash_entry), GFP_KERNEL);
|
||||
if (!entry)
|
||||
return;
|
||||
entry->uid = uid;
|
||||
|
||||
rt_mutex_lock(&proc_uid_lock);
|
||||
if (uid_hash_entry_exists(uid)) {
|
||||
kfree(entry);
|
||||
} else {
|
||||
hash_add(proc_uid_hash_table, &entry->hash, uid);
|
||||
}
|
||||
rt_mutex_unlock(&proc_uid_lock);
|
||||
}
|
||||
|
||||
struct uid_entry {
|
||||
const char *name;
|
||||
int len;
|
||||
umode_t mode;
|
||||
const struct inode_operations *iop;
|
||||
const struct file_operations *fop;
|
||||
};
|
||||
|
||||
#define NOD(NAME, MODE, IOP, FOP) { \
|
||||
.name = (NAME), \
|
||||
.len = sizeof(NAME) - 1, \
|
||||
.mode = MODE, \
|
||||
.iop = IOP, \
|
||||
.fop = FOP, \
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
const struct file_operations proc_uid_time_in_state_operations = {
|
||||
.open = single_uid_time_in_state_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct uid_entry uid_base_stuff[] = {
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
NOD("time_in_state", 0444, NULL, &proc_uid_time_in_state_operations),
|
||||
#endif
|
||||
};
|
||||
|
||||
const struct inode_operations proc_uid_def_inode_operations = {
|
||||
.setattr = proc_setattr,
|
||||
};
|
||||
|
||||
struct inode *proc_uid_make_inode(struct super_block *sb, kuid_t kuid)
|
||||
{
|
||||
struct inode *inode;
|
||||
|
||||
inode = new_inode(sb);
|
||||
if (!inode)
|
||||
return NULL;
|
||||
|
||||
inode->i_ino = get_next_ino();
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
|
||||
inode->i_op = &proc_uid_def_inode_operations;
|
||||
inode->i_uid = kuid;
|
||||
|
||||
return inode;
|
||||
}
|
||||
|
||||
static int proc_uident_instantiate(struct inode *dir, struct dentry *dentry,
|
||||
struct task_struct *unused, const void *ptr)
|
||||
{
|
||||
const struct uid_entry *u = ptr;
|
||||
struct inode *inode;
|
||||
|
||||
inode = proc_uid_make_inode(dir->i_sb, dir->i_uid);
|
||||
if (!inode)
|
||||
return -ENOENT;
|
||||
|
||||
inode->i_mode = u->mode;
|
||||
if (S_ISDIR(inode->i_mode))
|
||||
set_nlink(inode, 2);
|
||||
if (u->iop)
|
||||
inode->i_op = u->iop;
|
||||
if (u->fop)
|
||||
inode->i_fop = u->fop;
|
||||
d_add(dentry, inode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dentry *proc_uid_base_lookup(struct inode *dir,
|
||||
struct dentry *dentry,
|
||||
unsigned int flags)
|
||||
{
|
||||
const struct uid_entry *u, *last;
|
||||
unsigned int nents = ARRAY_SIZE(uid_base_stuff);
|
||||
|
||||
if (nents == 0)
|
||||
return ERR_PTR(-ENOENT);
|
||||
|
||||
last = &uid_base_stuff[nents - 1];
|
||||
for (u = uid_base_stuff; u <= last; u++) {
|
||||
if (u->len != dentry->d_name.len)
|
||||
continue;
|
||||
if (!memcmp(dentry->d_name.name, u->name, u->len))
|
||||
break;
|
||||
}
|
||||
if (u > last)
|
||||
return ERR_PTR(-ENOENT);
|
||||
|
||||
return ERR_PTR(proc_uident_instantiate(dir, dentry, NULL, u));
|
||||
}
|
||||
|
||||
static int proc_uid_base_readdir(struct file *file, struct dir_context *ctx)
|
||||
{
|
||||
unsigned int nents = ARRAY_SIZE(uid_base_stuff);
|
||||
const struct uid_entry *u;
|
||||
|
||||
if (!dir_emit_dots(file, ctx))
|
||||
return 0;
|
||||
|
||||
if (ctx->pos >= nents + 2)
|
||||
return 0;
|
||||
|
||||
for (u = uid_base_stuff + (ctx->pos - 2);
|
||||
u <= uid_base_stuff + nents - 1; u++) {
|
||||
if (!proc_fill_cache(file, ctx, u->name, u->len,
|
||||
proc_uident_instantiate, NULL, u))
|
||||
break;
|
||||
ctx->pos++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct inode_operations proc_uid_base_inode_operations = {
|
||||
.lookup = proc_uid_base_lookup,
|
||||
.setattr = proc_setattr,
|
||||
};
|
||||
|
||||
static const struct file_operations proc_uid_base_operations = {
|
||||
.read = generic_read_dir,
|
||||
.iterate = proc_uid_base_readdir,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
static int proc_uid_instantiate(struct inode *dir, struct dentry *dentry,
|
||||
struct task_struct *unused, const void *ptr)
|
||||
{
|
||||
unsigned int i, len;
|
||||
nlink_t nlinks;
|
||||
kuid_t *kuid = (kuid_t *)ptr;
|
||||
struct inode *inode = proc_uid_make_inode(dir->i_sb, *kuid);
|
||||
|
||||
if (!inode)
|
||||
return -ENOENT;
|
||||
|
||||
inode->i_mode = S_IFDIR | 0555;
|
||||
inode->i_op = &proc_uid_base_inode_operations;
|
||||
inode->i_fop = &proc_uid_base_operations;
|
||||
inode->i_flags |= S_IMMUTABLE;
|
||||
|
||||
nlinks = 2;
|
||||
len = ARRAY_SIZE(uid_base_stuff);
|
||||
for (i = 0; i < len; ++i) {
|
||||
if (S_ISDIR(uid_base_stuff[i].mode))
|
||||
++nlinks;
|
||||
}
|
||||
set_nlink(inode, nlinks);
|
||||
|
||||
d_add(dentry, inode);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int proc_uid_readdir(struct file *file, struct dir_context *ctx)
|
||||
{
|
||||
int last_shown, i;
|
||||
unsigned long bkt;
|
||||
struct uid_hash_entry *entry;
|
||||
|
||||
if (!dir_emit_dots(file, ctx))
|
||||
return 0;
|
||||
|
||||
i = 0;
|
||||
last_shown = ctx->pos - 2;
|
||||
rt_mutex_lock(&proc_uid_lock);
|
||||
hash_for_each(proc_uid_hash_table, bkt, entry, hash) {
|
||||
int len;
|
||||
char buf[PROC_NUMBUF];
|
||||
|
||||
if (i < last_shown)
|
||||
continue;
|
||||
len = snprintf(buf, sizeof(buf), "%u", entry->uid);
|
||||
if (!proc_fill_cache(file, ctx, buf, len,
|
||||
proc_uid_instantiate, NULL, &entry->uid))
|
||||
break;
|
||||
i++;
|
||||
ctx->pos++;
|
||||
}
|
||||
rt_mutex_unlock(&proc_uid_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dentry *proc_uid_lookup(struct inode *dir, struct dentry *dentry,
|
||||
unsigned int flags)
|
||||
{
|
||||
int result = -ENOENT;
|
||||
|
||||
uid_t uid = name_to_int(&dentry->d_name);
|
||||
bool uid_exists;
|
||||
|
||||
rt_mutex_lock(&proc_uid_lock);
|
||||
uid_exists = uid_hash_entry_exists(uid);
|
||||
rt_mutex_unlock(&proc_uid_lock);
|
||||
if (uid_exists) {
|
||||
kuid_t kuid = make_kuid(current_user_ns(), uid);
|
||||
|
||||
result = proc_uid_instantiate(dir, dentry, NULL, &kuid);
|
||||
}
|
||||
return ERR_PTR(result);
|
||||
}
|
||||
|
||||
static const struct file_operations proc_uid_operations = {
|
||||
.read = generic_read_dir,
|
||||
.iterate = proc_uid_readdir,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
static const struct inode_operations proc_uid_inode_operations = {
|
||||
.lookup = proc_uid_lookup,
|
||||
.setattr = proc_setattr,
|
||||
};
|
||||
|
||||
int __init proc_uid_init(void)
|
||||
{
|
||||
proc_uid = proc_mkdir("uid", NULL);
|
||||
if (!proc_uid)
|
||||
return -ENOMEM;
|
||||
proc_uid->proc_iops = &proc_uid_inode_operations;
|
||||
proc_uid->proc_fops = &proc_uid_operations;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/cputime.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/notifier.h>
|
||||
@@ -651,8 +650,6 @@ int cpufreq_boost_supported(void);
|
||||
int cpufreq_boost_enabled(void);
|
||||
int cpufreq_enable_boost_support(void);
|
||||
bool policy_has_boost_freq(struct cpufreq_policy *policy);
|
||||
void acct_update_power(struct task_struct *p, cputime_t cputime);
|
||||
void cpufreq_task_stats_init(struct task_struct *p);
|
||||
#else
|
||||
static inline int cpufreq_boost_trigger_state(int state)
|
||||
{
|
||||
@@ -696,32 +693,3 @@ struct sched_domain;
|
||||
unsigned long cpufreq_scale_freq_capacity(struct sched_domain *sd, int cpu);
|
||||
unsigned long cpufreq_scale_max_freq_capacity(int cpu);
|
||||
#endif /* _LINUX_CPUFREQ_H */
|
||||
|
||||
/*********************************************************************
|
||||
* CPUFREQ STATS *
|
||||
*********************************************************************/
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
|
||||
void acct_update_power(struct task_struct *p, cputime_t cputime);
|
||||
void cpufreq_task_stats_init(struct task_struct *p);
|
||||
void cpufreq_task_stats_alloc(struct task_struct *p);
|
||||
void cpufreq_task_stats_free(struct task_struct *p);
|
||||
void cpufreq_task_stats_remove_uids(uid_t uid_start, uid_t uid_end);
|
||||
int proc_time_in_state_show(struct seq_file *m, struct pid_namespace *ns,
|
||||
struct pid *pid, struct task_struct *p);
|
||||
int proc_concurrent_active_time_show(struct seq_file *m,
|
||||
struct pid_namespace *ns, struct pid *pid, struct task_struct *p);
|
||||
int proc_concurrent_policy_time_show(struct seq_file *m,
|
||||
struct pid_namespace *ns, struct pid *pid, struct task_struct *p);
|
||||
int single_uid_time_in_state_open(struct inode *inode, struct file *file);
|
||||
#else
|
||||
static inline void acct_update_power(struct task_struct *p,
|
||||
cputime_t cputime) {}
|
||||
static inline void cpufreq_task_stats_init(struct task_struct *p) {}
|
||||
static inline void cpufreq_task_stats_alloc(struct task_struct *p) {}
|
||||
static inline void cpufreq_task_stats_free(struct task_struct *p) {}
|
||||
static inline void cpufreq_task_stats_exit(struct task_struct *p) {}
|
||||
static inline void cpufreq_task_stats_remove_uids(uid_t uid_start,
|
||||
uid_t uid_end) {}
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,6 @@ extern void *proc_get_parent_data(const struct inode *);
|
||||
extern void proc_remove(struct proc_dir_entry *);
|
||||
extern void remove_proc_entry(const char *, struct proc_dir_entry *);
|
||||
extern int remove_proc_subtree(const char *, struct proc_dir_entry *);
|
||||
extern void proc_register_uid(kuid_t uid);
|
||||
|
||||
#else /* CONFIG_PROC_FS */
|
||||
|
||||
@@ -72,7 +71,6 @@ static inline void *proc_get_parent_data(const struct inode *inode) { BUG(); ret
|
||||
static inline void proc_remove(struct proc_dir_entry *de) {}
|
||||
#define remove_proc_entry(name, parent) do {} while (0)
|
||||
static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *parent) { return 0; }
|
||||
static inline void proc_register_uid(kuid_t uid) {}
|
||||
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
|
||||
|
||||
@@ -1721,8 +1721,6 @@ struct task_struct {
|
||||
|
||||
cputime_t utime, stime, utimescaled, stimescaled;
|
||||
cputime_t gtime;
|
||||
atomic64_t *time_in_state;
|
||||
unsigned int max_state;
|
||||
struct prev_cputime prev_cputime;
|
||||
#ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
|
||||
seqlock_t vtime_seqlock;
|
||||
@@ -2041,8 +2039,6 @@ struct task_struct {
|
||||
unsigned long task_state_change;
|
||||
#endif
|
||||
int pagefault_disabled;
|
||||
atomic64_t *concurrent_active_time;
|
||||
atomic64_t *concurrent_policy_time;
|
||||
/* CPU-specific state of this task */
|
||||
struct thread_struct thread;
|
||||
/*
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
#include <linux/writeback.h>
|
||||
#include <linux/shm.h>
|
||||
#include <linux/kcov.h>
|
||||
#include <linux/cpufreq.h>
|
||||
|
||||
#include "sched/tune.h"
|
||||
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/sysctl.h>
|
||||
#include <linux/kcov.h>
|
||||
#include <linux/cpufreq.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/pgalloc.h>
|
||||
@@ -228,9 +227,6 @@ static void account_kernel_stack(unsigned long *stack, int account)
|
||||
|
||||
void free_task(struct task_struct *tsk)
|
||||
{
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
cpufreq_task_stats_free(tsk);
|
||||
#endif
|
||||
account_kernel_stack(tsk->stack, -1);
|
||||
arch_release_thread_stack(tsk->stack);
|
||||
free_thread_stack(tsk->stack);
|
||||
@@ -1368,10 +1364,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
|
||||
if (!p)
|
||||
goto fork_out;
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
cpufreq_task_stats_init(p);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This _must_ happen before we call free_task(), i.e. before we jump
|
||||
* to any of the bad_fork_* labels. This is to avoid freeing
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
#include <linux/binfmts.h>
|
||||
#include <linux/context_tracking.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/cpufreq.h>
|
||||
|
||||
#include <asm/switch_to.h>
|
||||
#include <asm/tlb.h>
|
||||
@@ -2180,10 +2179,6 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p)
|
||||
memset(&p->se.statistics, 0, sizeof(p->se.statistics));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
cpufreq_task_stats_init(p);
|
||||
#endif
|
||||
|
||||
RB_CLEAR_NODE(&p->dl.rb_node);
|
||||
init_dl_task_timer(&p->dl);
|
||||
__dl_clear_params(p);
|
||||
@@ -2262,11 +2257,6 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)
|
||||
int cpu = get_cpu();
|
||||
|
||||
__sched_fork(clone_flags, p);
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
cpufreq_task_stats_alloc(p);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We mark the process as running here. This guarantees that
|
||||
* nobody will actually run it, and a signal or other external
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/static_key.h>
|
||||
#include <linux/context_tracking.h>
|
||||
#include <linux/cpufreq.h>
|
||||
#include "sched.h"
|
||||
#include "walt.h"
|
||||
|
||||
@@ -166,11 +165,6 @@ void account_user_time(struct task_struct *p, cputime_t cputime,
|
||||
|
||||
/* Account for user time used */
|
||||
acct_account_cputime(p);
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
/* Account power usage for system time */
|
||||
acct_update_power(p, cputime);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -221,11 +215,6 @@ void __account_system_time(struct task_struct *p, cputime_t cputime,
|
||||
|
||||
/* Account for system time used */
|
||||
acct_account_cputime(p);
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ_STAT
|
||||
/* Account power usage for system time */
|
||||
acct_update_power(p, cputime);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/user_namespace.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/proc_ns.h>
|
||||
|
||||
/*
|
||||
@@ -202,7 +201,6 @@ struct user_struct *alloc_uid(kuid_t uid)
|
||||
}
|
||||
spin_unlock_irq(&uidhash_lock);
|
||||
}
|
||||
proc_register_uid(uid);
|
||||
|
||||
return up;
|
||||
|
||||
@@ -224,7 +222,6 @@ static int __init uid_cache_init(void)
|
||||
spin_lock_irq(&uidhash_lock);
|
||||
uid_hash_insert(&root_user, uidhashentry(GLOBAL_ROOT_UID));
|
||||
spin_unlock_irq(&uidhash_lock);
|
||||
proc_register_uid(GLOBAL_ROOT_UID);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user