From: Paul Jackson <pj@sgi.com>
To: Mel Gorman <mel@csn.ul.ie>
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: Thu, 14 Jul 2005 04:06:13 -0700 [thread overview]
Message-ID: <20050714040613.10b244ee.pj@sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0507130815420.1174@skynet>
Mel wrote:
> Well, what would people feel is obvious?
The lines that you (Mel) add that I am puzzling over ways to clarify are
these added lines in gfp.h:
+#define __GFP_KERNRCLM 0x20000u /* Kernel page that is easily reclaimable */
+#define __GFP_USERRCLM 0x40000u /* User is a userspace user */
+#define __GFP_TYPE_SHIFT 17 /* Translate RCLM flags to array index */
and perhaps these added lines in mmzone.h:
+/* Page allocations are divided into these types */
+#define ALLOC_TYPES 4
+#define ALLOC_KERNNORCLM 0
+#define ALLOC_KERNRCLM 1
+#define ALLOC_USERRCLM 2
+#define ALLOC_FALLBACK 3
+
+/* Number of bits required to encode the type */
+#define BITS_PER_ALLOC_TYPE 2
It didn't jump out at me, first pass, that these two GFP bits
were a 2 bit field, not 2 separate and independent bits. The name
GFP_TYPE_SHIFT is vague. There are some redundant (interdependent)
defines here.
How about (just brainstorming here) something like the following:
#define __GFP_RCLM_BITS 0x60000u /* page reclaim types: see RCLM_* defines */
/*
* Reduce buddy heap fragmentation by keeping pages with similar
* reclaimability behavior together. The two bit field __GFP_RECLAIMBITS
* enumerates the following 4 kinds of page reclaimability:
*/
#define RCLM_NONRECLAIMABLE 0 /* nonreclaimable kernel pages */
#define RCLM_KERNEL 1 /* reclaimable kernel pages */
#define RCLM_USER 2 /* reclaimable user pages */
#define RCLM_FALLBACK 3 /* mark alloc requests when memory low */
#define RCLM_SHIFT 17 /* Shift __GFP_RECLAIMBITS to RCLM_* values */
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
--
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>
next prev parent reply other threads:[~2005-07-14 11:06 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
2005-07-14 11:06 ` Paul Jackson [this message]
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=20050714040613.10b244ee.pj@sgi.com \
--to=pj@sgi.com \
--cc=haveblue@us.ibm.com \
--cc=jschopp@austin.ibm.com \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
/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