login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
March
»
24
Re: [PATCH 05/11] Export unusable free space index via /proc/unusable_index
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: KAMEZAWA Hiroyuki
Subject:
Re: [PATCH 05/11] Export unusable free space index via /proc/unusable_index
Date: Tuesday, March 23, 2010 - 5:13 pm
On Wed, 24 Mar 2010 09:16:07 +0900 Minchan Kim <minchan.kim@gmail.com> wrote:
quoted text
> Hi, Kame. > > On Wed, Mar 24, 2010 at 9:03 AM, KAMEZAWA Hiroyuki > <kamezawa.hiroyu@jp.fujitsu.com> wrote: > > On Tue, 23 Mar 2010 12:25:40 +0000 > > Mel Gorman <mel@csn.ul.ie> wrote: > > > >> Unusable free space index is a measure of external fragmentation that > >> takes the allocation size into account. For the most part, the huge page > >> size will be the size of interest but not necessarily so it is exported > >> on a per-order and per-zone basis via /proc/unusable_index. > >> > >> The index is a value between 0 and 1. It can be expressed as a > >> percentage by multiplying by 100 as documented in > >> Documentation/filesystems/proc.txt. > >> > >> Signed-off-by: Mel Gorman <mel@csn.ul.ie> > >> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> > >> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> > >> Acked-by: Rik van Riel <riel@redhat.com> > >> --- > >> Documentation/filesystems/proc.txt | 13 ++++- > >> mm/vmstat.c | 120 +++++++++++++++++++++++++++++++++ > >> 2 files changed, 132 insertions(+), 1 deletions(-) > >> > >> diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt > >> index 5e132b5..5c4b0fb 100644 > >> --- a/Documentation/filesystems/proc.txt > >> +++ b/Documentation/filesystems/proc.txt > >> @@ -452,6 +452,7 @@ Table 1-5: Kernel info in /proc > >> sys See chapter 2 > >> sysvipc Info of SysVIPC Resources (msg, sem, shm) (2.4) > >> tty Info of tty drivers > >> + unusable_index Additional page allocator information (see text)(2.5) > >> uptime System uptime > >> version Kernel version > >> video bttv info of video resources (2.4) > >> @@ -609,7 +610,7 @@ ZONE_DMA, 4 chunks of 2^1*PAGE_SIZE in ZONE_DMA, 101 chunks of 2^4*PAGE_SIZE > >> available in ZONE_NORMAL, etc... > >> > >> More information relevant to external fragmentation can be found in > >> -pagetypeinfo. > >> +pagetypeinfo and unusable_index > >> > >> > cat /proc/pagetypeinfo > >> Page block order: 9 > >> @@ -650,6 +651,16 @@ unless memory has been mlock()'d. Some of the Reclaimable blocks should > >> also be allocatable although a lot of filesystem metadata may have to be > >> reclaimed to achieve this. > >> > >> +> cat /proc/unusable_index > >> +Node 0, zone DMA 0.000 0.000 0.000 0.001 0.005 0.013 0.021 0.037 0.037 0.101 0.230 > >> +Node 0, zone Normal 0.000 0.000 0.000 0.001 0.002 0.002 0.005 0.015 0.028 0.028 0.054 > >> + > >> +The unusable free space index measures how much of the available free > >> +memory cannot be used to satisfy an allocation of a given size and is a > >> +value between 0 and 1. The higher the value, the more of free memory is > >> +unusable and by implication, the worse the external fragmentation is. This > >> +can be expressed as a percentage by multiplying by 100. > >> + > >> .............................................................................. > >> > >> meminfo: > >> diff --git a/mm/vmstat.c b/mm/vmstat.c > >> index 7f760cb..ca42e10 100644 > >> --- a/mm/vmstat.c > >> +++ b/mm/vmstat.c > >> @@ -453,6 +453,106 @@ static int frag_show(struct seq_file *m, void *arg) > >> return 0; > >> } > >> > >> + > >> +struct contig_page_info { > >> + unsigned long free_pages; > >> + unsigned long free_blocks_total; > >> + unsigned long free_blocks_suitable; > >> +}; > >> + > >> +/* > >> + * Calculate the number of free pages in a zone, how many contiguous > >> + * pages are free and how many are large enough to satisfy an allocation of > >> + * the target size. Note that this function makes to attempt to estimate > >> + * how many suitable free blocks there *might* be if MOVABLE pages were > >> + * migrated. Calculating that is possible, but expensive and can be > >> + * figured out from userspace > >> + */ > >> +static void fill_contig_page_info(struct zone *zone, > >> + unsigned int suitable_order, > >> + struct contig_page_info *info) > >> +{ > >> + unsigned int order; > >> + > >> + info->free_pages = 0; > >> + info->free_blocks_total = 0; > >> + info->free_blocks_suitable = 0; > >> + > >> + for (order = 0; order < MAX_ORDER; order++) { > >> + unsigned long blocks; > >> + > >> + /* Count number of free blocks */ > >> + blocks = zone->free_area[order].nr_free; > >> + info->free_blocks_total += blocks; > > > > ....for what this free_blocks_total is ? > > It's used by fragmentation_index in [06/11]. >
Ah, I see. thanks. -Kame --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 05/11] Export unusable free space index via /proc/u ...
, Mel Gorman
, (Tue Mar 23, 5:25 am)
Re: [PATCH 05/11] Export unusable free space index via /pr ...
, Christoph Lameter
, (Tue Mar 23, 10:31 am)
Re: [PATCH 05/11] Export unusable free space index via /pr ...
, Mel Gorman
, (Tue Mar 23, 11:14 am)
Re: [PATCH 05/11] Export unusable free space index via /pr ...
, KAMEZAWA Hiroyuki
, (Tue Mar 23, 5:03 pm)
Re: [PATCH 05/11] Export unusable free space index via /p ...
, KAMEZAWA Hiroyuki
, (Tue Mar 23, 5:13 pm)
Re: [PATCH 05/11] Export unusable free space index via /p ...
, Minchan Kim
, (Tue Mar 23, 5:16 pm)
Re: [PATCH 05/11] Export unusable free space index via /pr ...
, Mel Gorman
, (Wed Mar 24, 3:25 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Michael Trimarchi
Re: [PATCH] VFS: make file->f_pos access atomic on 32bit arch
Miklos Szeredi
[patch 14/15] vfs: more path_permission() conversions
Serge E. Hallyn
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
Bernd Schmidt
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Takashi Iwai
[PATCH 2/2] input: Add LED support to Synaptics device
git
:
Junio C Hamano
Re: mingw, windows, crlf/lf, and git
Eyvind Bernhardsen
Re: Where has "git ls-remote" reference pattern matching gone?
Shawn O. Pearce
Re: Switching from CVS to GIT
Todd Zullinger
Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters
Santi Béjar
Re: How to use git-fmt-merge-msg?
linux-netdev
:
Ramkrishna Vepa
[net-2.6 PATCH 1/10] Neterion: New driver: Driver help file
Mark Anthony
invitation / inquiry
Ingo Molnar
Re: [PATCH 08/16] dma-debug: add core checking functions
David Miller
Re: [PATCH 1/3] f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Sascha Hauer
[PATCH 03/12] fec: do not typedef struct types
git-commits-head
:
Linux Kernel Mailing List
amba: struct device - replace bus_id with dev_name(), dev_set_name()
Linux Kernel Mailing List
MIPS: Yosemite: Convert SMP startup lock to arch spinlock.
Linux Kernel Mailing List
ARM: S5PC100: IRQ and timer
Linux Kernel Mailing List
davinci: edma: clear interrupt status for interrupt enabled channels only
Linux Kernel Mailing List
x86, mm, kprobes: fault.c, simplify notify_page_fault()
openbsd-misc
:
Daniel A. Ramaley
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Matthias Kilian
Re: can't get vesa @ 1280x800 or nv
Tobias Ulmer
Re: Problem after upgrade 4.5 to 4.6: ERR M
Philip Guenther
Re: SIGCHLD and libpthread.so
J.C. Roberts
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Colocation donated by:
Syndicate