lkml.org 
[lkml]   [2004]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 2] Xen core patch : arch_free_page return value
Date
From
> On Wed, 2004-11-17 at 15:48, Ian Pratt wrote:
> > This patch adds a return value to the existing arch_free_page function
> > that indicates whether the normal free routine still has work to
> > do. The only architecture that currently uses arch_free_page is arch
> > 'um'. arch-xen needs this for 'foreign pages' - pages that don't
> > belong to the page allocator but are instead managed by custom
> > allocators.
>
> But, you're modifying page allocator functions to do this. Why would
> you call __free_pages_ok() on a page that didn't belong to the page
> allocator?

Pages that have been allocated by our custom allocators get passed
into standard linux subsystems where we get no control over how
they're freed. We want the normal page ref counting etc to happen
as per normal, we just want to intercept the final free so that
we can return it to our allocator rather than the standard one.

We use custom allocators in a number of places, most notably for
the pages storing the packet data fragments that are pointed to
by skbs. This enables us to providing guest virtual machines with
zero-copy access to the network, which is a big performance win.

The existing arch_free_page mechanism very nearly does what we
want, we just need to add the 'early exit'.

Thanks,
Ian
-
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 14:08    [W:0.066 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site