lkml.org 
[lkml]   [2003]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Oops] i386 mm/slab.c (cache_flusharray)
On Fri, Dec 05, 2003 at 07:14:55AM +0000, Christoph Hellwig wrote:
> On Fri, Dec 05, 2003 at 08:21:10AM +1100, Nathan Scott wrote:
> > Yeah, thats pretty silly stuff - and should be fairly easy to
> > fix by using a pagebuf flag to differentiate the two. Will do.
>
> IMHO a flags is wrong here. Just maek pb_addr always a pointer and
> for the case it's the preallocated array make it point pb_page_array
> or something like that. Then check whether pb_addr is pointing to the
> preallocated array.

You might be mixing up pb_pages and pb_addr there? pb_addr is
always a pointer. We need to distinguish whether it was slab
alloc'd or whether it points into page cache pages, so we know
whether to page_cache_release the pages or kfree the pointer
when we're done with the pagebuf.

The pb_page_array works just as you describe, with a prealloc'd
array of page pointers, and pb_pages either points to the array
of to a larger kmalloc'd array as necessary.

cheers.

--
Nathan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.042 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site