Re: [PATCH] ring_bufer: fix BUF_PAGE_SIZE

From: Steven Rostedt
Date: Mon Dec 22 2008 - 12:57:53 EST



On Sat, 20 Dec 2008, Lai Jiangshan wrote:

> Ingo Molnar wrote:
> > * Lai Jiangshan <laijs@xxxxxxxxxxxxxx> wrote:
> >
> >> impact: make BUF_PAGE_SIZE changeable.
> >>
> >> Except allocating/freeing page and the code using PAGE_MASK,
> >> all code expect buffer_page's length is BUF_PAGE_SIZE.
> >>
> >> This patch make this behavior more concordant.
> >>
> [...]
> >
> > hm, why? Non-order-0 allocations are pretty evil - why would we ever want
> > to do them?
> >
> > Ingo
> >
>
> I think since we introduce BUF_PAGE_SIZE instead of PAGE_SIZE for
> buffer_page, we should make it changeable. We can use Non-order-0
> allocations, but it doesn't mean we have to use Non-order-0 allocations.
>
> In the old codes, these lines confuse me:
> return (addr & ~PAGE_MASK) - (PAGE_SIZE - BUF_PAGE_SIZE);
> addr &= PAGE_MASK;
> This patch mostly make the codes concordant.

I need to rename the BUF_PAGE_SIZE to BUF_SIZE, since it is not really a
page. I'm moving to keep a header on each page so that I can use splice
and still be able to process the pages elsewhere. The BUF_SIZE is the size
of the PAGE - that header.

I think it is too early to move the ringbuffer to bigger than a page sub
buffers.

-- Steve

--
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/