Merge branches 'tracing/ftrace', 'tracing/ring-buffer' and 'tracing/urgent' into tracing/core

Conflicts:
	include/linux/ftrace.h
This commit is contained in:
Ingo Molnar 2008-12-19 09:42:40 +01:00
234 changed files with 4051 additions and 2674 deletions

View file

@ -176,7 +176,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
int ret = 0;
struct device *dev;
if (WARN_ON(bdi->dev))
if (bdi->dev) /* The driver needs to use separate queues per device */
goto exit;
va_start(args, fmt);

View file

@ -987,25 +987,18 @@ out:
/*
* Determine the nodes of an array of pages and store it in an array of status.
*/
static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
const void __user * __user *pages,
int __user *status)
static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages,
const void __user **pages, int *status)
{
unsigned long i;
int err;
down_read(&mm->mmap_sem);
for (i = 0; i < nr_pages; i++) {
const void __user *p;
unsigned long addr;
unsigned long addr = (unsigned long)(*pages);
struct vm_area_struct *vma;
struct page *page;
err = -EFAULT;
if (get_user(p, pages+i))
goto out;
addr = (unsigned long) p;
int err = -EFAULT;
vma = find_vma(mm, addr);
if (!vma)
@ -1024,12 +1017,52 @@ static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
err = page_to_nid(page);
set_status:
put_user(err, status+i);
*status = err;
pages++;
status++;
}
up_read(&mm->mmap_sem);
}
/*
* Determine the nodes of a user array of pages and store it in
* a user array of status.
*/
static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
const void __user * __user *pages,
int __user *status)
{
#define DO_PAGES_STAT_CHUNK_NR 16
const void __user *chunk_pages[DO_PAGES_STAT_CHUNK_NR];
int chunk_status[DO_PAGES_STAT_CHUNK_NR];
unsigned long i, chunk_nr = DO_PAGES_STAT_CHUNK_NR;
int err;
for (i = 0; i < nr_pages; i += chunk_nr) {
if (chunk_nr + i > nr_pages)
chunk_nr = nr_pages - i;
err = copy_from_user(chunk_pages, &pages[i],
chunk_nr * sizeof(*chunk_pages));
if (err) {
err = -EFAULT;
goto out;
}
do_pages_stat_array(mm, chunk_nr, chunk_pages, chunk_status);
err = copy_to_user(&status[i], chunk_status,
chunk_nr * sizeof(*chunk_status));
if (err) {
err = -EFAULT;
goto out;
}
}
err = 0;
out:
up_read(&mm->mmap_sem);
return err;
}

View file

@ -49,6 +49,9 @@ static int __init alloc_node_page_cgroup(int nid)
start_pfn = NODE_DATA(nid)->node_start_pfn;
nr_pages = NODE_DATA(nid)->node_spanned_pages;
if (!nr_pages)
return 0;
table_size = sizeof(struct page_cgroup) * nr_pages;
base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),

View file

@ -535,7 +535,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
struct kmem_cache *c;
c = slob_alloc(sizeof(struct kmem_cache),
flags, ARCH_KMALLOC_MINALIGN, -1);
GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1);
if (c) {
c->name = name;

View file

@ -3597,7 +3597,7 @@ static int list_locations(struct kmem_cache *s, char *buf,
for (i = 0; i < t.count; i++) {
struct location *l = &t.loc[i];
if (len > PAGE_SIZE - 100)
if (len > PAGE_SIZE - KSYM_SYMBOL_LEN - 100)
break;
len += sprintf(buf + len, "%7ld ", l->count);

View file

@ -299,7 +299,6 @@ void lru_add_drain(void)
put_cpu();
}
#if defined(CONFIG_NUMA) || defined(CONFIG_UNEVICTABLE_LRU)
static void lru_add_drain_per_cpu(struct work_struct *dummy)
{
lru_add_drain();
@ -313,18 +312,6 @@ int lru_add_drain_all(void)
return schedule_on_each_cpu(lru_add_drain_per_cpu);
}
#else
/*
* Returns 0 for success
*/
int lru_add_drain_all(void)
{
lru_add_drain();
return 0;
}
#endif
/*
* Batched page_cache_release(). Decrement the reference count on all the
* passed pages. If it fell to zero then remove the page from the LRU and

View file

@ -1717,7 +1717,7 @@ static int s_show(struct seq_file *m, void *p)
v->addr, v->addr + v->size, v->size);
if (v->caller) {
char buff[2 * KSYM_NAME_LEN];
char buff[KSYM_SYMBOL_LEN];
seq_putc(m, ' ');
sprint_symbol(buff, (unsigned long)v->caller);