Re: [PATCHv3] perf: Fix vmalloc ring buffer free function
From: Peter Zijlstra
Date: Tue Mar 12 2013 - 11:26:41 EST
On Tue, 2013-03-12 at 14:52 +0100, Jiri Olsa wrote:
> > @@ -373,7 +373,7 @@ struct ring_buffer *rb_alloc(int nr_pages, long watermark, int cpu, int flags)
> > rb->user_page = all_buf;
> > rb->data_pages[0] = all_buf + PAGE_SIZE;
> > rb->page_order = ilog2(nr_pages);
> > - rb->nr_pages = 1;
> > + rb->nr_pages = nr_pages;
> >
>
> hum, and this ^^^ breaks perf_data_size(rb) ;)
>
> static inline unsigned long perf_data_size(struct ring_buffer *rb)
> {
> return rb->nr_pages << (PAGE_SHIFT + page_order(rb));
> }
How so? 0 << n keeps being 0, right?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/