Merge branch 'akpm' (incoming from Andrew)
Merge first patch-bomb from Andrew Morton: - a couple of misc things - inotify/fsnotify work from Jan - ocfs2 updates (partial) - about half of MM * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (117 commits) mm/migrate: remove unused function, fail_migrate_page() mm/migrate: remove putback_lru_pages, fix comment on putback_movable_pages mm/migrate: correct failure handling if !hugepage_migration_support() mm/migrate: add comment about permanent failure path mm, page_alloc: warn for non-blockable __GFP_NOFAIL allocation failure mm: compaction: reset scanner positions immediately when they meet mm: compaction: do not mark unmovable pageblocks as skipped in async compaction mm: compaction: detect when scanners meet in isolate_freepages mm: compaction: reset cached scanner pfn's before reading them mm: compaction: encapsulate defer reset logic mm: compaction: trace compaction begin and end memcg, oom: lock mem_cgroup_print_oom_info sched: add tracepoints related to NUMA task migration mm: numa: do not automatically migrate KSM pages mm: numa: trace tasks that fail migration due to rate limiting mm: numa: limit scope of lock for NUMA migrate rate limiting mm: numa: make NUMA-migrate related functions static lib/show_mem.c: show num_poisoned_pages when oom mm/hwpoison: add '#' to hwpoison_inject mm/memblock: use WARN_ONCE when MAX_NUMNODES passed as input parameter ...
This commit is contained in:
+5
-15
@@ -912,12 +912,13 @@ static void evict_chunk(struct audit_chunk *chunk)
|
||||
}
|
||||
|
||||
static int audit_tree_handle_event(struct fsnotify_group *group,
|
||||
struct inode *to_tell,
|
||||
struct fsnotify_mark *inode_mark,
|
||||
struct fsnotify_mark *vfsmonut_mark,
|
||||
struct fsnotify_event *event)
|
||||
struct fsnotify_mark *vfsmount_mark,
|
||||
u32 mask, void *data, int data_type,
|
||||
const unsigned char *file_name)
|
||||
{
|
||||
BUG();
|
||||
return -EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void audit_tree_freeing_mark(struct fsnotify_mark *entry, struct fsnotify_group *group)
|
||||
@@ -933,19 +934,8 @@ static void audit_tree_freeing_mark(struct fsnotify_mark *entry, struct fsnotify
|
||||
BUG_ON(atomic_read(&entry->refcnt) < 1);
|
||||
}
|
||||
|
||||
static bool audit_tree_send_event(struct fsnotify_group *group, struct inode *inode,
|
||||
struct fsnotify_mark *inode_mark,
|
||||
struct fsnotify_mark *vfsmount_mark,
|
||||
__u32 mask, void *data, int data_type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static const struct fsnotify_ops audit_tree_ops = {
|
||||
.handle_event = audit_tree_handle_event,
|
||||
.should_send_event = audit_tree_send_event,
|
||||
.free_group_priv = NULL,
|
||||
.free_event_priv = NULL,
|
||||
.freeing_mark = audit_tree_freeing_mark,
|
||||
};
|
||||
|
||||
|
||||
+6
-18
@@ -465,35 +465,27 @@ void audit_remove_watch_rule(struct audit_krule *krule)
|
||||
}
|
||||
}
|
||||
|
||||
static bool audit_watch_should_send_event(struct fsnotify_group *group, struct inode *inode,
|
||||
struct fsnotify_mark *inode_mark,
|
||||
struct fsnotify_mark *vfsmount_mark,
|
||||
__u32 mask, void *data, int data_type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Update watch data in audit rules based on fsnotify events. */
|
||||
static int audit_watch_handle_event(struct fsnotify_group *group,
|
||||
struct inode *to_tell,
|
||||
struct fsnotify_mark *inode_mark,
|
||||
struct fsnotify_mark *vfsmount_mark,
|
||||
struct fsnotify_event *event)
|
||||
u32 mask, void *data, int data_type,
|
||||
const unsigned char *dname)
|
||||
{
|
||||
struct inode *inode;
|
||||
__u32 mask = event->mask;
|
||||
const char *dname = event->file_name;
|
||||
struct audit_parent *parent;
|
||||
|
||||
parent = container_of(inode_mark, struct audit_parent, mark);
|
||||
|
||||
BUG_ON(group != audit_watch_group);
|
||||
|
||||
switch (event->data_type) {
|
||||
switch (data_type) {
|
||||
case (FSNOTIFY_EVENT_PATH):
|
||||
inode = event->path.dentry->d_inode;
|
||||
inode = ((struct path *)data)->dentry->d_inode;
|
||||
break;
|
||||
case (FSNOTIFY_EVENT_INODE):
|
||||
inode = event->inode;
|
||||
inode = (struct inode *)data;
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
@@ -512,11 +504,7 @@ static int audit_watch_handle_event(struct fsnotify_group *group,
|
||||
}
|
||||
|
||||
static const struct fsnotify_ops audit_watch_fsnotify_ops = {
|
||||
.should_send_event = audit_watch_should_send_event,
|
||||
.handle_event = audit_watch_handle_event,
|
||||
.free_group_priv = NULL,
|
||||
.freeing_mark = NULL,
|
||||
.free_event_priv = NULL,
|
||||
};
|
||||
|
||||
static int __init audit_watch_init(void)
|
||||
|
||||
@@ -74,6 +74,7 @@ static void __unhash_process(struct task_struct *p, bool group_dead)
|
||||
__this_cpu_dec(process_counts);
|
||||
}
|
||||
list_del_rcu(&p->thread_group);
|
||||
list_del_rcu(&p->thread_node);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1035,6 +1035,11 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
|
||||
sig->nr_threads = 1;
|
||||
atomic_set(&sig->live, 1);
|
||||
atomic_set(&sig->sigcnt, 1);
|
||||
|
||||
/* list_add(thread_node, thread_head) without INIT_LIST_HEAD() */
|
||||
sig->thread_head = (struct list_head)LIST_HEAD_INIT(tsk->thread_node);
|
||||
tsk->thread_node = (struct list_head)LIST_HEAD_INIT(sig->thread_head);
|
||||
|
||||
init_waitqueue_head(&sig->wait_chldexit);
|
||||
sig->curr_target = tsk;
|
||||
init_sigpending(&sig->shared_pending);
|
||||
@@ -1474,6 +1479,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
|
||||
atomic_inc(¤t->signal->sigcnt);
|
||||
list_add_tail_rcu(&p->thread_group,
|
||||
&p->group_leader->thread_group);
|
||||
list_add_tail_rcu(&p->thread_node,
|
||||
&p->signal->thread_head);
|
||||
}
|
||||
attach_pid(p, PIDTYPE_PID);
|
||||
nr_threads++;
|
||||
|
||||
@@ -637,7 +637,7 @@ __register_nosave_region(unsigned long start_pfn, unsigned long end_pfn,
|
||||
BUG_ON(!region);
|
||||
} else
|
||||
/* This allocation cannot fail */
|
||||
region = alloc_bootmem(sizeof(struct nosave_region));
|
||||
region = memblock_virt_alloc(sizeof(struct nosave_region), 0);
|
||||
region->start_pfn = start_pfn;
|
||||
region->end_pfn = end_pfn;
|
||||
list_add_tail(®ion->list, &nosave_regions);
|
||||
|
||||
@@ -757,14 +757,10 @@ void __init setup_log_buf(int early)
|
||||
return;
|
||||
|
||||
if (early) {
|
||||
unsigned long mem;
|
||||
|
||||
mem = memblock_alloc(new_log_buf_len, PAGE_SIZE);
|
||||
if (!mem)
|
||||
return;
|
||||
new_log_buf = __va(mem);
|
||||
new_log_buf =
|
||||
memblock_virt_alloc(new_log_buf_len, PAGE_SIZE);
|
||||
} else {
|
||||
new_log_buf = alloc_bootmem_nopanic(new_log_buf_len);
|
||||
new_log_buf = memblock_virt_alloc_nopanic(new_log_buf_len, 0);
|
||||
}
|
||||
|
||||
if (unlikely(!new_log_buf)) {
|
||||
|
||||
@@ -1108,6 +1108,7 @@ int migrate_swap(struct task_struct *cur, struct task_struct *p)
|
||||
if (!cpumask_test_cpu(arg.src_cpu, tsk_cpus_allowed(arg.dst_task)))
|
||||
goto out;
|
||||
|
||||
trace_sched_swap_numa(cur, arg.src_cpu, p, arg.dst_cpu);
|
||||
ret = stop_two_cpus(arg.dst_cpu, arg.src_cpu, migrate_swap_stop, &arg);
|
||||
|
||||
out:
|
||||
@@ -4603,6 +4604,7 @@ int migrate_task_to(struct task_struct *p, int target_cpu)
|
||||
|
||||
/* TODO: This is not properly updating schedstats */
|
||||
|
||||
trace_sched_move_numa(p, curr_cpu, target_cpu);
|
||||
return stop_one_cpu(curr_cpu, migration_cpu_stop, &arg);
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -1250,11 +1250,15 @@ static int task_numa_migrate(struct task_struct *p)
|
||||
p->numa_scan_period = task_scan_min(p);
|
||||
|
||||
if (env.best_task == NULL) {
|
||||
int ret = migrate_task_to(p, env.best_cpu);
|
||||
ret = migrate_task_to(p, env.best_cpu);
|
||||
if (ret != 0)
|
||||
trace_sched_stick_numa(p, env.src_cpu, env.best_cpu);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = migrate_swap(p, env.best_task);
|
||||
if (ret != 0)
|
||||
trace_sched_stick_numa(p, env.src_cpu, task_cpu(env.best_task));
|
||||
put_task_struct(env.best_task);
|
||||
return ret;
|
||||
}
|
||||
|
||||
+8
-3
@@ -95,8 +95,6 @@
|
||||
#if defined(CONFIG_SYSCTL)
|
||||
|
||||
/* External variables not in a header file. */
|
||||
extern int sysctl_overcommit_memory;
|
||||
extern int sysctl_overcommit_ratio;
|
||||
extern int max_threads;
|
||||
extern int suid_dumpable;
|
||||
#ifdef CONFIG_COREDUMP
|
||||
@@ -1121,7 +1119,14 @@ static struct ctl_table vm_table[] = {
|
||||
.data = &sysctl_overcommit_ratio,
|
||||
.maxlen = sizeof(sysctl_overcommit_ratio),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
.proc_handler = overcommit_ratio_handler,
|
||||
},
|
||||
{
|
||||
.procname = "overcommit_kbytes",
|
||||
.data = &sysctl_overcommit_kbytes,
|
||||
.maxlen = sizeof(sysctl_overcommit_kbytes),
|
||||
.mode = 0644,
|
||||
.proc_handler = overcommit_kbytes_handler,
|
||||
},
|
||||
{
|
||||
.procname = "page-cluster",
|
||||
|
||||
Reference in New Issue
Block a user