linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Paul Jackson <pj@sgi.com>
Cc: jschopp@austin.ibm.com, haveblue@us.ibm.com, linux-mm@kvack.org
Subject: Re: [Fwd: [PATCH 2/4] cpusets new __GFP_HARDWALL flag]
Date: Wed, 13 Jul 2005 12:15:30 +0100 (IST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0507130815420.1174@skynet> (raw)
In-Reply-To: <20050712132940.148a9490.pj@sgi.com>

On Tue, 12 Jul 2005, Paul Jackson wrote:

> Mel wrote:
> > Joel, when merging the patches, there is one hack you need to watch out
> > for. It is important for performance reasons but it is 100% obvious
> > either.
>
> I suspect you meant "it is _not_ 100% obvious" ...

Sorry, yes, it is not 100% obvious

> Is there someway that the gfp.h changes could be reworked to make it
> 100% obvious that these two bits are not separate and independent
> bits, but rather are a two bit field, counting an index from 0 to 3?
>

Well, what would people feel is obvious? I will always think it is clear
as I am the source of the confusion.

The two flags are not a two bit field as such, they just get treated as
that to save a few cycles. It could also be done with something like;

index = (!!(gfp_flags & __GFP_KERNRCLM) << 1) || (!!(gfp_flags & __GFP_USERRCLM))

(untested) which means if the bits change position or value, the code
won't care. This is a slightly more expensive, but possibly clearer way to
do things.

-- 
Mel Gorman
Part-time Phd Student                          Java Applications Developer
University of Limerick                         IBM Dublin Software Lab
--
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:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2005-07-13 11:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1121101013.15095.19.camel@localhost>
2005-07-11 17:36 ` Joel Schopp
2005-07-11 17:49   ` Dave Hansen
2005-07-12  2:55   ` Paul Jackson
2005-07-12  5:24     ` Dave Hansen
2005-07-12  6:11       ` Paul Jackson
2005-07-12 13:05     ` Mel Gorman
2005-07-12 20:29       ` Paul Jackson
2005-07-13 11:15         ` Mel Gorman [this message]
2005-07-14 11:06           ` Paul Jackson
2005-07-18 12:32             ` Mel Gorman
2005-07-18 20:08               ` Joel Schopp
2005-07-27  8:29               ` Paul Jackson
2005-07-27 11:10                 ` Mel Gorman

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=Pine.LNX.4.58.0507130815420.1174@skynet \
    --to=mel@csn.ul.ie \
    --cc=haveblue@us.ibm.com \
    --cc=jschopp@austin.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=pj@sgi.com \
    /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