lkml.org 
[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] percpu: use ZERO_SIZE_PTR / ZERO_OR_NULL_PTR
Hello,

On Mon, Jan 30, 2012 at 11:58:52AM -0600, Christoph Lameter wrote:
> > No, NULL is never gonna be a valid return from any allocator including
> > percpu. Percpu allocator doesn't and will never do so.
>
> How do you prevent the percpu allocator from returning NULL? I thought the
> per cpu offsets can wrap around?

I thought it didn't. I rememer thinking about this and determining
that NULL can't be allocated for dynamic addresses. Maybe I'm
imagining things. Anyways, if it can return NULL for valid
allocation, it is a bug and should be fixed.

> > I'm saying we don't have this for ZERO_SIZE_PTR in any meaningful way
> > at this point. If somebody wants to implement it properly, please
> > feel free to, but simply applying ZERO_SIZE_PTR without other changes
> > doesn't make any sense.
>
> We have no clean notion of how a percpu pointer needs to be handled. Both
> ways of handling things have drawbacks.

We don't have returned addr >= PAGE_SIZE guarantee yet but I'm fairly
sure that's the only acceptable direction if we want any improvement
in this area.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2012-01-30 19:05    [W:0.055 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site