From: Andrew Morton <akpm@osdl.org>
To: Jeff Dike <jdike@addtoit.com>
Cc: Ian.Pratt@cl.cam.ac.uk, haveblue@us.ibm.com,
linux-kernel@vger.kernel.org, Keir.Fraser@cl.cam.ac.uk,
Christian.Limpach@cl.cam.ac.uk
Subject: Re: [patch 2] Xen core patch : arch_free_page return value
Date: Wed, 17 Nov 2004 19:09:33 -0800 [thread overview]
Message-ID: <20041117190933.16e8b8ed.akpm@osdl.org> (raw)
In-Reply-To: <200411180508.iAI58iQ3007886@ccure.user-mode-linux.org>
Jeff Dike <jdike@addtoit.com> wrote:
>
> Ian.Pratt@cl.cam.ac.uk said:
> > 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.
>
> I have to agree with Dave - this is just a wierd solution. I added
> arch_free_page to do arch-specific, invisible-to-the-generic-kernel things.
> My intent may not be the be-all and end-all for this, but I think the semantics
> you want to add to it are not that reasonable.
>
> My gut reaction (without knowing your problem in any detail) would be that
> you need too add some more structure to whatever mechanism you have
> so that the pages land in your allocator automatically, like a slab or a new
> zone or something.
>
I can't immediately think of any way of doing that.
One could perhaps hide it with
#ifdef CONFIG_ZEN
#define __free_pages_ok xen_free_page
#else
#define __free_pages_ok everybody_else_free_page
#endif
and rename __free_pages_ok() to everybody_else_free_page().
But heck - why bother? The current patch adds just one line of code in one
place, and the compiler will toss it away anyway for all but xen and um.
I think we can live with that.
next prev parent reply other threads:[~2004-11-18 3:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-17 23:48 [patch 2] Xen core patch : arch_free_page return value Ian Pratt
2004-11-18 1:04 ` Dave Hansen
2004-11-18 1:19 ` Ian Pratt
2004-11-18 1:26 ` Dave Hansen
2004-11-18 8:35 ` Keir Fraser
2004-11-18 9:17 ` Andrew Morton
2004-11-18 5:08 ` Jeff Dike
2004-11-18 3:09 ` Andrew Morton [this message]
2004-11-18 6:54 ` Jeff Dike
2004-11-18 4:57 ` Andrew Morton
2004-11-18 8:37 ` Mitchell Blank Jr
-- strict thread matches above, loose matches on Subject: below --
2004-11-18 10:05 Ian Pratt
2004-11-18 10:14 ` Andrew Morton
2004-11-18 10:18 ` Keir Fraser
2004-11-18 12:39 ` William Lee Irwin III
2004-11-18 10:36 ` William Lee Irwin III
2004-11-18 12:51 ` Ian Pratt
2004-11-18 12:57 ` William Lee Irwin III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041117190933.16e8b8ed.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=Christian.Limpach@cl.cam.ac.uk \
--cc=Ian.Pratt@cl.cam.ac.uk \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=haveblue@us.ibm.com \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox