lkml.org 
[lkml]   [2013]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHv2] perf: Fix vmalloc ring buffer free function
From
Date
On Mon, 2013-03-11 at 12:21 +0100, Jiri Olsa wrote:
> > pg_nr = offset >> page_shift;
> > pg_offset = offset & (1 << page_shift) - 1;
> >
> > You just wrecked that.
> >
> > > handle->page &= rb->nr_pages - 1;
>
> here's ^^^ where the handle->page becomes 0 due to (rb->nr_pages == 0)

then that'll be &= -1, which is a nop, no?

Also, you wrecked it for anything that uses some intermediate page
order (we currently don't).



\
 
 \ /
  Last update: 2013-03-11 18:02    [W:0.940 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site