linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Chubb <peterc@gelato.unsw.edu.au>
To: Christoph Lameter <clameter@sgi.com>
Cc: Peter Chubb <peterc@gelato.unsw.edu.au>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	linux-mm@kvack.org
Subject: Re: A solution for more GFP_xx flags?
Date: Tue, 12 Sep 2006 13:11:44 +1000	[thread overview]
Message-ID: <878xkpaidr.wl%peterc@quokka.chubb.wattle.id.au> (raw)
In-Reply-To: <Pine.LNX.4.64.0609112006220.7923@schroedinger.engr.sgi.com>

>>>>> "Christoph" == Christoph Lameter <clameter@sgi.com> writes:

Christoph> On Tue, 12 Sep 2006, Peter Chubb wrote:
>> Dunno about you, but the thought of passing structs around on the
>> stack gives me the heebie jeebies, especially if they're going to
>> be more than a word or so big.

Christoph> Right.
 
>> Either pass by reference, or separate out the args, so it's
>> explicit how much info's being copied around.

Christoph> Maybe I misunderstood Nick but I did not think he was
Christoph> proposing pushing structs on the stack.

Maybe I misunderstood you:

Christoph> We could define a structure

Christoph> struct allocation_control {
Christoph> 	unsigned long flags;	/* Traditional flags */
Christoph> 	int node;
Christoph> 	struct cpuset_context *cpuset;
Christoph>	struct mempol *mpol;
Christoph> };

Christoph>We could define struct constants called GFP_KERNEL and GFP_ATOMIC.
Christoph> const struct allocation_control gfp_kernel {
Christoph>	GFP_KERNEL, -1, NULL, NULL
Christoph> }

Christoph> And then do

Christoph> alloc_pages(n, gfp_kernel)

Did you mean alloc_pages(n, &gfp_kernel) ??


--
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au           ERTOS within National ICT Australia

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-09-12  3:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-12  2:28 Christoph Lameter
2006-09-12  2:44 ` Nick Piggin
2006-09-12  3:01   ` Christoph Lameter
2006-09-12  3:05     ` Peter Chubb
2006-09-12  3:07       ` Christoph Lameter
2006-09-12  3:11         ` Peter Chubb [this message]
2006-09-12  5:32           ` Christoph Lameter
2006-09-12  6:16 ` Paul Jackson

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=878xkpaidr.wl%peterc@quokka.chubb.wattle.id.au \
    --to=peterc@gelato.unsw.edu.au \
    --cc=clameter@sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    /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