[Libhugetlbfs-devel] [PATCH 1/1] hugectl: add some basic interface tests

2008-11-03 Thread Andy Whitcroft
This adds some basic interface tests. It makes use of the --dry-run option to determine which variables have been set and to which values. We also check for the various warnings generated. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- tests/Makefile | 10 +++- tests/hugect

[Libhugetlbfs-devel] [PATCH 0/1] hugectl tests V1

2008-11-03 Thread Andy Whitcroft
During testing of the new multi page size support in hugectl I found a bug in the options handling which had been missed. So I have been putting together a new test harness for host tools. This is an example of that and includes support for interface testing of hugectl. -apw Andy Whitcroft (1

[Libhugetlbfs-devel] [PATCH 1/1] hugectl: add support for multiple page sizes

2008-10-30 Thread Andy Whitcroft
possible result in warnings as normal. The sizes are not validated but passed verbatim to the library which will then validate them. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugectl.c | 139 +++-- man/hugectl.8 | 21 +-

Re: [Libhugetlbfs-devel] [PATCH 1/1] hugectl: add support for multiple page sizes

2008-10-30 Thread Andy Whitcroft
On Thu, Oct 30, 2008 at 11:33:11AM +, Mel Gorman wrote: > On Wed, Oct 29, 2008 at 04:02:53PM +0000, Andy Whitcroft wrote: > > Add support for multiple page sizes to hugectl. Now that the library > > supports specification of the backing page size to use for the various > &g

[Libhugetlbfs-devel] [PATCH 1/1] hugectl: fix up Makefile to correctly pass LIB32/LIB64 to hugectl

2008-10-29 Thread Andy Whitcroft
It seems we are passing the LIB32/LIB64 defines to the link phase and not the compile phase for hugectl. This means that it will not set the library path correctly. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- Makefile |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

Re: [Libhugetlbfs-devel] [PATCH 1/1] hugectl: add support for multiple page sizes

2008-10-29 Thread Andy Whitcroft
On Wed, Oct 29, 2008 at 04:43:02PM +, Eric B Munson wrote: > On Wed, 29 Oct 2008, Andy Whitcroft wrote: > > > Add support for multiple page sizes to hugectl. Now that the library > > supports specification of the backing page size to use for the various > > mappin

[Libhugetlbfs-devel] [PATCH 1/1] hugectl: add support for multiple page sizes

2008-10-29 Thread Andy Whitcroft
possible result in warnings as normal. The sizes are not validated but passed verbatim to the library which will then validate them. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugectl.c | 108 - 1 files changed, 71 inse

Re: [Libhugetlbfs-devel] [PATCH 2/3] add a new export type for main library probe points for tests

2008-10-28 Thread Andy Whitcroft
On Tue, Oct 28, 2008 at 09:44:10AM -0500, Adam Litke wrote: > On Tue, 2008-10-28 at 13:54 +0000, Andy Whitcroft wrote: > > When testing the library we sometimes want to influence data which becomes > > cached within the library. To allow this we need to reset that cached data >

[Libhugetlbfs-devel] [PATCH 0/3] V1 tracepoints

2008-10-28 Thread Andy Whitcroft
e cache in the library through a new test probe interface. Comments? -apw Andy Whitcroft (3): privutils: cache and expose the kernel default page size add a new export type for main library probe points for tests hugetlbfs default page size is cached so expose reset for testing h

[Libhugetlbfs-devel] [PATCH 3/3] hugetlbfs default page size is cached so expose reset for testing

2008-10-28 Thread Andy Whitcroft
kernel_default_hugepage_size_reset() as a test probe, and use this within the gethugepagesizes test. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeutils.c |4 libhugetlbfs_testprobes.h |4 tests/gethugepagesizes.c |4 3 files changed, 12 inse

[Libhugetlbfs-devel] [PATCH 1/3] privutils: cache and expose the kernel default page size

2008-10-28 Thread Andy Whitcroft
routine kernel_default_hugepage_size() which looks this up and caches the result. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Eric B Munson <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- hugeutils.c

[Libhugetlbfs-devel] [PATCH 2/3] add a new export type for main library probe points for tests

2008-10-28 Thread Andy Whitcroft
. These are external symbols but not exposed in the standard header, but in libhugetlbfs_testprobe.h. They are also name mangled. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- libhugetlbfs_internal.h |1 + libhugetlbfs_testprobes.h | 35 +++

Re: [Libhugetlbfs-devel] [PATCH 2/2] gethugepagesizes: fix selection of counting mode

2008-10-24 Thread Andy Whitcroft
On Fri, Oct 24, 2008 at 02:01:58PM +0100, Mel Gorman wrote: > On Thu, Oct 23, 2008 at 03:54:59PM +0100, Andy Whitcroft wrote: > > gethugepagesizes has two modes: a counting mode which tells us exactly > > how many entries we would need; and a lookup mode which fills in a >

[Libhugetlbfs-devel] [PATCH 1/2] tests: gethugepagesizes -- switch meminfo override to intercepting open

2008-10-23 Thread Andy Whitcroft
implementation of read_meminfo. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- tests/gethugepagesizes.c | 187 +- 1 files changed, 151 insertions(+), 36 deletions(-) diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c index 0

[Libhugetlbfs-devel] [PATCH 0/2] gethugepagesizes fixes

2008-10-23 Thread Andy Whitcroft
should be noted that this is a corner case where the caller passes a buffer but requests zero entries be filled in, this should not affect any sensible use case. -apw Andy Whitcroft (2): tests: gethugepagesizes -- switch meminfo override to intercepting open gethugepagesizes: fix selection

[Libhugetlbfs-devel] [PATCH 2/2] gethugepagesizes: fix selection of counting mode

2008-10-23 Thread Andy Whitcroft
when the element count is zero which causes it to trigger at the edge case where the caller (pointlessly) passes in a buffer with an element count of zero. Fix behaviour to match the documentation. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeutils.c | 19 ++--

Re: [Libhugetlbfs-devel] [PATCH 2/4] tests: Infrastructure for expected test failures

2008-10-23 Thread Andy Whitcroft
On Wed, Oct 22, 2008 at 08:55:13PM +, Adam Litke wrote: > The libhugetlbfs test suite has various tests for which a failure (under > certain circumstances) is expected and not indicative of an error. It would > be desirable to specially annotate these cases to eliminate the need for the > t

Re: [Libhugetlbfs-devel] [PATCH] Add reference to hugeadm for pool admin and adjust page count for tests V2

2008-10-23 Thread Andy Whitcroft
On Wed, Oct 22, 2008 at 10:08:45AM +0100, Eric B Munson wrote: > This patch Adjusts the HOWTO section on sizing huge page pools to reference > the hugeadm utlity. > > Also it changes the number of pages from 20 to 25 for most test cases and > calls out PowerPC 64kb pages as a specific instance whe

[Libhugetlbfs-devel] [PATCH 0/5] V1 hugeadm no overcommit and other fun

2008-10-22 Thread Andy Whitcroft
times. The forth makes hugeadm behave more sensibly when run on a kernel which does not support hugepages at all. The last is a proposed cleanup to use a common cached value for the kernel default page size as we look it up very often and it is not cheap. Signed-off-by: Andy Whitcroft <[EM

[Libhugetlbfs-devel] [PATCH 3/5] hugeadm: cleanup pool size adjustment for kernels without overcommit

2008-10-22 Thread Andy Whitcroft
where there is no overcommit support we simply always update the maximum to match. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeadm.c| 16 ++-- hugeutils.c | 30 ++ libhugetlbfs_privutils.h |3 +++ 3

[Libhugetlbfs-devel] [PATCH 4/5] hugeadm: check for and report the lack of hugepage support in the kernel

2008-10-22 Thread Andy Whitcroft
A lot of commands simply will go horribly wrong if we do not have hugepage support in the kernel. Check for and error out if we do not have hugepage support. Note that we still allow usage checks and the like regardless. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hug

[Libhugetlbfs-devel] [PATCH 1/5] counters: we should be using size_to_smaller_unit to convert units

2008-10-22 Thread Andy Whitcroft
When moving from KB to B for the default page size we must always use size_to_smaller_unit in case we overflow. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeutils.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hugeutils.c b/hugeutils.c index a

[Libhugetlbfs-devel] [PATCH 5/5] privutils: expose the kernel default page size

2008-10-22 Thread Andy Whitcroft
routine kernel_default_hugepage_size() which looks this up and caches the result. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeutils.c | 32 libhugetlbfs_privutils.h |3 +++ shm.c|2 +- 3 files chang

[Libhugetlbfs-devel] [PATCH 2/5] hugeadm: emit the usage is no operations are specified

2008-10-22 Thread Andy Whitcroft
If no operations were specified then ensure we emit the usage. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeadm.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hugeadm.c b/hugeadm.c index 8434eef..9c7ae1c 100644 --- a/hugeadm.c +++ b/hug

Re: [Libhugetlbfs-devel] [PATCH] Add reference to hugeadm for pool admin and adjust page count for tests

2008-10-21 Thread Andy Whitcroft
On Tue, Oct 21, 2008 at 09:06:29AM +0100, Eric B Munson wrote: > This patch Adjusts the HOWTO section on sizing huge page pools to reference > the hugeadm utlity. > > Also it changes the number of pages from 20 to 25 for most test cases and > calls out PowerPC 64kb pages as a specific instance whe

Re: [Libhugetlbfs-devel] [PATCH] tests: check_linkhuge_tests style FIXES

2008-10-21 Thread Andy Whitcroft
On Mon, Oct 20, 2008 at 10:14:54PM +, Adam Litke wrote: > Andy Whitcroft had some good suggestions on my check_linkhuge_tests patch. > - Comment the format of LINKHUGE_WORDSIZES > - Use a case statement instead of an if/else > > Signed-off-by: Adam Litke <[EMAIL PROTECTED

[Libhugetlbfs-devel] [PATCH 1/2] document which headers to use for library static and private utility functions

2008-10-20 Thread Andy Whitcroft
Document which headers should be used when declaring functions static to the library, and functions destined for the private utility library. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h |7 +++ libhugetlbfs_internal.h

[Libhugetlbfs-devel] [PATCH 2/2] whitespace: cleanup whitespace breakage

2008-10-20 Thread Andy Whitcroft
We have developed a far amount of whitespace damage over time. Do a one off cleanup of all of the breakage now. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- HOWTO|2 +- README |2 +- elf64ppc.c |2 +- elf

[Libhugetlbfs-devel] [PATCH 0/2] V1 comment improvements and whitespace fixes

2008-10-20 Thread Andy Whitcroft
Following this email are two patches. The first attempts to document the various header files as suggested by Adam Litke. The second cleans up all the whitespace issues I could detect in the source. -apw Andy Whitcroft (2): document which headers to use for library static and private utility

Re: [Libhugetlbfs-devel] [PATCH 03/14] stop exposing pool configuration in the main library

2008-10-20 Thread Andy Whitcroft
On Mon, Oct 20, 2008 at 11:50:39AM +0100, Mel Gorman wrote: > On (17/10/08 17:14), Andy Whitcroft didst pronounce: > > > Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> > > --- > > Makefile |6 +++--- > > hugetlbfs.h |

Re: [Libhugetlbfs-devel] [PATCH 01/14] move to a new library local idiom

2008-10-20 Thread Andy Whitcroft
On Mon, Oct 20, 2008 at 11:36:30AM +0100, Mel Gorman wrote: > On (17/10/08 17:14), Andy Whitcroft didst pronounce: > > Currently we have three types of function: > > > > file local -- marked static in the normal way, > > library local -- external but prefixed with _

Re: [Libhugetlbfs-devel] [PATCH 02/14] add a new private utilities library

2008-10-20 Thread Andy Whitcroft
On Mon, Oct 20, 2008 at 11:47:10AM +0100, Mel Gorman wrote: > On (17/10/08 17:14), Andy Whitcroft didst pronounce: > > Add a new private utilities library consisting of various useful helpers > > normally hidden within libhugetlbfs. Extend the library local marker idiom > >

Re: [Libhugetlbfs-devel] [PATCH 06/14] make print_valid_features/check_features_env_valid file static

2008-10-20 Thread Andy Whitcroft
On Mon, Oct 20, 2008 at 12:13:38PM +0100, Mel Gorman wrote: > On Fri, Oct 17, 2008 at 05:14:13PM +0100, Andy Whitcroft wrote: > > Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> > > --- > > hugetlbfs.h |1 - > > kernel-features.c |4

Re: [Libhugetlbfs-devel] [PATCH 07/14] make dump_proc_pid_maps library static

2008-10-20 Thread Andy Whitcroft
On Mon, Oct 20, 2008 at 12:15:13PM +0100, Mel Gorman wrote: > I think the subject is misleading. It says we are making it static, but > it's really moving headers. If it's meant to read "move to private > header", then it looks ok. Yes that is what its mean to be. -apw --

Re: [Libhugetlbfs-devel] [PATCH] tests: check_linkhuge_tests must check each word size

2008-10-20 Thread Andy Whitcroft
On Fri, Oct 17, 2008 at 06:36:52PM +, Adam Litke wrote: > In run_tests.sh, the function check_linkhuge_tests() checks if it is safe to > run the legacy linkhuge tests by examining the default linker script. But > when > binaries are compiled with a different word size, they use a different li

Re: [Libhugetlbfs-devel] [PATCH 02/14] add a new private utilities library

2008-10-19 Thread Andy Whitcroft
On Fri, Oct 17, 2008 at 03:11:01PM -0500, Adam Litke wrote: > On Fri, 2008-10-17 at 17:14 +0100, Andy Whitcroft wrote: > > diff --git a/tests/Makefile b/tests/Makefile > > index e4e1ce2..f03ec68 100644 > > --- a/tests/Makefile > > +++ b/tests/Makefile > > @@

[Libhugetlbfs-devel] [PATCH 12/14] make direct_syscall library static

2008-10-17 Thread Andy Whitcroft
Note that as this is directly referenced in assembly we cannot trivially rename it to __lh_, nor would this make it easy to change back and forth. Take this as an exception and put it directly in the version.lds. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- version.lds |1 + 1

[Libhugetlbfs-devel] [PATCH 13/14] export getpagesizes/gethugepagesizes as V2.1 API

2008-10-17 Thread Andy Whitcroft
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- version.lds |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/version.lds b/version.lds index 0517ad3..1429230 100644 --- a/version.lds +++ b/version.lds @@ -15,3 +15,9 @@ HTLBFS_2.0 { get_huge

[Libhugetlbfs-devel] [PATCH 11/14] make plt_extrasz library static

2008-10-17 Thread Andy Whitcroft
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- elf32ppclinux.c |2 ++ elf64ppc.c |2 ++ libhugetlbfs_internal.h |3 +++ 3 files changed, 7 insertions(+), 0 deletions(-) diff --git a/elf32ppclinux.c b/elf32ppclinux.c index eb54411..24adaf1 100644

[Libhugetlbfs-devel] [PATCH 14/14] export hugetlbfs_find_path_for_size/hugetlbfs_unlinked_fd_for_size as V2.1 API

2008-10-17 Thread Andy Whitcroft
We have historically exported the default size versions of these functions. It makes sense therefore to export their new multi-pagesize versions as part of the V2.1 API. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- version.lds |2 ++ 1 files changed, 2 insertions(+), 0 del

[Libhugetlbfs-devel] [PATCH 10/14] make __hugetlbfs_* flags library static

2008-10-17 Thread Andy Whitcroft
None of these flags or debugging flags need to be exported. Move them all library static: __hugetlbfs_debug __hugetlbfs_hostname __hugetlbfs_prefault __hugetlbfs_verbose Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- libhugetlbfs_internal.h |4 +

[Libhugetlbfs-devel] [PATCH 06/14] make print_valid_features/check_features_env_valid file static

2008-10-17 Thread Andy Whitcroft
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h |1 - kernel-features.c |4 ++-- libhugetlbfs_internal.h |3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hugetlbfs.h b/hugetlbfs.h index 06c427f..fc23f9f 100644 --- a/huget

[Libhugetlbfs-devel] [PATCH 03/14] stop exposing pool configuration in the main library

2008-10-17 Thread Andy Whitcroft
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- Makefile |6 +++--- hugetlbfs.h | 16 hugeutils.c |6 +- init_privutils.c |2 ++ libhugetlbfs_internal.h | 12 libhugetlbfs_privutils.h

[Libhugetlbfs-devel] [PATCH 04/14] make hugetlb_counter_info/select_pool_counter file static

2008-10-17 Thread Andy Whitcroft
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeutils.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hugeutils.c b/hugeutils.c index 81a834a..e053691 100644 --- a/hugeutils.c +++ b/hugeutils.c @@ -122,7 +122,7 @@ struct hugetlb_pool_counter_

[Libhugetlbfs-devel] [PATCH 01/14] move to a new library local idiom

2008-10-17 Thread Andy Whitcroft
converts all current library local functions to this new idiom. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- alloc.c |2 +- debug.c |2 +- elflink.c |6 +++--- hugeadm.c | 14 +++--- huget

[Libhugetlbfs-devel] [PATCH 02/14] add a new private utilities library

2008-10-17 Thread Andy Whitcroft
only routines exported. This makes it very hard for the two libraries to interfere with each other when both are linked to the same binary, which is particularly important when testing the library; we must test the real one. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- Ma

[Libhugetlbfs-devel] [PATCH 05/14] stop exporting kernel detection

2008-10-17 Thread Andy Whitcroft
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- Makefile |2 +- hugetlbfs.h |9 - kernel-features.c|1 + libhugetlbfs_privutils.h | 10 ++ 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Makefile b/Ma

[Libhugetlbfs-devel] [PATCH 0/14] V1 library export cleanup

2008-10-17 Thread Andy Whitcroft
exported. The final two patches export the four routines we have added to the offical API in this release. -apw Andy Whitcroft (14): move to a new library local idiom add a new private utilities library stop exposing pool configuration in the main library make hugetlb_counter_info

[Libhugetlbfs-devel] [PATCH 08/14] make hpage_sizes file static

2008-10-17 Thread Andy Whitcroft
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeutils.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hugeutils.c b/hugeutils.c index e053691..a319e89 100644 --- a/hugeutils.c +++ b/hugeutils.c @@ -51,7 +51,7 @@ static int hugepagesize_errno;

[Libhugetlbfs-devel] [PATCH 07/14] make dump_proc_pid_maps library static

2008-10-17 Thread Andy Whitcroft
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h |4 libhugetlbfs_internal.h |4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hugetlbfs.h b/hugetlbfs.h index fc23f9f..6b64ee7 100644 --- a/hugetlbfs.h +++ b/hugetlbfs.h @@

[Libhugetlbfs-devel] [PATCH 09/14] make libhugetlbfs_version file static

2008-10-17 Thread Andy Whitcroft
Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- version.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/version.c b/version.c index 4070fe0..0ab886a 100644 --- a/version.c +++ b/version.c @@ -1,3 +1,3 @@ #include "version.h" -const char libh

[Libhugetlbfs-devel] [PATCH 17/17] pagesize: add utility to list page sizes

2008-10-13 Thread Andy Whitcroft
Add a new utility to list page sizes supported on the system. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- Makefile |8 +++- pagesize.c | 143 2 files changed, 15

[Libhugetlbfs-devel] [PATCH 16/17] hugeutils: gethugepagesizes -- ensure we ignore unrepresentable page sizes

2008-10-13 Thread Andy Whitcroft
When calling gethugepagesizes in a 32 bit environment it is possible that some page sizeds will not be representable in the result. Ensure we detect and elide these. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> Acked-by: Adam Litke <[

[Libhugetlbfs-devel] [PATCH 11/17] hugeutils: export the pool counter update interface

2008-10-13 Thread Andy Whitcroft
Rename and export the pool counter update interface. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Adam Litke <[EMAIL PROTECTED]> --- hugetlbfs.h |2 ++ hugeutils.c | 26 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/h

[Libhugetlbfs-devel] [PATCH 14/17] lib: Add gethugepagesizes() API call

2008-10-13 Thread Andy Whitcroft
EMAIL PROTECTED]> Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h |1 + hugeutils.c | 65 + tests/Makefile |3 +- tests/gethugepagesizes.c | 226 ++ tests/run_tests.sh

[Libhugetlbfs-devel] [PATCH 13/17] hugeadm: expose the available and possible page sizes

2008-10-13 Thread Andy Whitcroft
, which have pages assigned to the pool and which are exposed via a mount point. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- hugeadm.c | 40 1 files changed, 40 insertions(+), 0 deletions(-)

[Libhugetlbfs-devel] [PATCH 10/17] hugeadm: sort the pool configuration output by size and mark the default

2008-10-13 Thread Andy Whitcroft
Sort the output of the pool configuration listing --pool-list, and now that the default size will not be first mark it in a new Default column. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Adam Litke <[EMAIL PROTECTED]> --- hugeadm.c

[Libhugetlbfs-devel] [PATCH 12/17] hugeadm: allow pools to be resized

2008-10-13 Thread Andy Whitcroft
requested should memory not be available. In this case we must recalculate the overcommit. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- hugeadm.c | 138 ++- hugeutils.c

[Libhugetlbfs-devel] [PATCH 15/17] lib: add a getpagesizes call returning all page sizes

2008-10-13 Thread Andy Whitcroft
Utilise the new gethugepagesizes call to implement getpagesizes() call returning all page sizes on the system, both base page sizes and all hugepage sizes. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h |1 + hugeutils.c

[Libhugetlbfs-devel] [PATCH 04/17] hugeutils: size_to_smaller_unit should allow 2GB pages

2008-10-13 Thread Andy Whitcroft
we have all of the negative range available so it seems logical to use a negative value to indicate error. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Adam Litke <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- hugeutils.c | 10 --

[Libhugetlbfs-devel] [PATCH 02/17] shm: Shared memory always uses the meminfo page size

2008-10-13 Thread Andy Whitcroft
From: Adam Litke <[EMAIL PROTECTED]> This patch fixes two intertwined issues: When the SHM_HUGETLB flag is passed to shmget(), the system default huge page size is used to back the shared memory segment. Unlike with mmap() there is not yet a way to use an alternate huge page size for shared memo

[Libhugetlbfs-devel] [PATCH 08/17] hugeadm: initial basic framework

2008-10-13 Thread Andy Whitcroft
Add a very basic framework for hugeadm, the administrator pool configuration helper. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> Acked-by: Adam Litke <[EMAIL PROTECTED]> --- Makefile |8 -

[Libhugetlbfs-devel] [RFC PATCH 00/17] V4 hugeadm framework

2008-10-13 Thread Andy Whitcroft
cream about fundamentals. For instance we have just change the name to hugeadm. Comments? -apw Adam Litke (4): utils: Make pool counter manipulation code part of the library API shm: Shared memory always uses the meminfo page size Do not allow zero as an explicit page size lib: Add get

[Libhugetlbfs-devel] [PATCH 06/17] build: allow utilities to consist of more than one file

2008-10-13 Thread Andy Whitcroft
Allow a utility control which source files it is made up of. This allows us to reuse some of the utility functions from within libhugetlbfs directly without linking against the library. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> Ac

[Libhugetlbfs-devel] [PATCH 03/17] Do not allow zero as an explicit page size

2008-10-13 Thread Andy Whitcroft
: Adam Litke <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeutils.c | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hugeutils.c b/hugeutils.c index 22ea4

[Libhugetlbfs-devel] [PATCH 09/17] hugeadm: expose the pool configuration

2008-10-13 Thread Andy Whitcroft
Expose pool allocations for each of the available page sizes via the --pool-list command. Exposes the miniumum and maximimum values indicating the dedicated pages and the size of the overcommit for all supported page sizes. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel

[Libhugetlbfs-devel] [PATCH 05/17] hugeutils: pull out common filenames

2008-10-13 Thread Andy Whitcroft
Pull out all the common filenames and prefixes to a common set of defines. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> Acked-by: Adam Litke <[EMAIL PROTECTED]> --- hugeutils.c | 16 ++-- 1 files changed, 10 insertio

[Libhugetlbfs-devel] [PATCH 01/17] utils: Make pool counter manipulation code part of the library API

2008-10-13 Thread Andy Whitcroft
fixed up by the next patch. [EMAIL PROTECTED]: consolidate makefile updates in one place] Signed-off-by: Adam Litke <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h

[Libhugetlbfs-devel] [PATCH 07/17] debug: allow utilities to share the common debug reporter

2008-10-13 Thread Andy Whitcroft
Where utilities are going to use routines out of the library directly it is helpful to share the debugging routines whilst maintaining the identity of the message producer. Allow the utilities to override the name shown. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Adam

Re: [Libhugetlbfs-devel] [PATCH 09/17] hugeadm: expose the pool configuration

2008-10-11 Thread Andy Whitcroft
On Fri, Oct 10, 2008 at 02:10:21PM -0500, Adam Litke wrote: > On Fri, 2008-10-10 at 16:58 +0100, Andy Whitcroft wrote: > > diff --git a/libhugetlbfs_internal.h b/libhugetlbfs_internal.h > > index 197fa05..2912c5e 100644 > > --- a/libhugetlbfs_internal.h > > ++

Re: [Libhugetlbfs-devel] [PATCH 13/17] hugeadm: expose the available and possible page sizes

2008-10-11 Thread Andy Whitcroft
On Fri, Oct 10, 2008 at 02:30:43PM -0500, Adam Litke wrote: > On Fri, 2008-10-10 at 16:58 +0100, Andy Whitcroft wrote: > > Expose possible page sizes. Expose the page sizes which are available > > (have pages assigned to them) via --page-sizes. Expose all possible page > >

[Libhugetlbfs-devel] [PATCH 15/17] lib: add a getpagesizes call returning all page sizes

2008-10-10 Thread Andy Whitcroft
Utilise the new gethugepagesizes call to implement getpagesizes() call returning all page sizes on the system, both base page sizes and all hugepage sizes. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h |1 + hugeutils.c

[Libhugetlbfs-devel] [PATCH 17/17] pagesize: add utility to list page sizes

2008-10-10 Thread Andy Whitcroft
Add a new utility to list page sizes supported on the system. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- Makefile |8 +++- pagesize.c | 143 2 files changed, 15

[Libhugetlbfs-devel] [PATCH 16/17] hugeutils: gethugepagesizes -- ensure we ignore unrepresentable page sizes

2008-10-10 Thread Andy Whitcroft
When calling gethugepagesizes in a 32 bit environment it is possible that some page sizeds will not be representable in the result. Ensure we detect and elide these. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- hugeutils.c |4 +

[Libhugetlbfs-devel] [PATCH 14/17] lib: Add gethugepagesizes() API call

2008-10-10 Thread Andy Whitcroft
EMAIL PROTECTED]> Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h |1 + hugeutils.c | 65 + tests/Makefile |3 +- tests/gethugepagesizes.c | 226 ++ tests/run_tests.sh

[Libhugetlbfs-devel] [PATCH 12/17] hugeadm: allow pools to be resized

2008-10-10 Thread Andy Whitcroft
in --pool-list. Adjustments are either absolute, or relative with a + or - prefix. For example the following incantion increases the 2MB page pool minimum by 10 pages. --pool-minimum-adjust 2048kb:+10 Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL

[Libhugetlbfs-devel] [PATCH 11/17] hugeutils: export the pool counter update interface

2008-10-10 Thread Andy Whitcroft
Rename and export the pool counter update interface. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h |2 ++ hugeutils.c | 26 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/hugetlbfs.h b/hugetlbfs.h index 2103515..f

[Libhugetlbfs-devel] [PATCH 10/17] hugeadm: sort the pool configuration output by size and mark the default

2008-10-10 Thread Andy Whitcroft
Sort the output of the pool configuration listing --pool-list, and now that the default size will not be first mark it in a new Default column. [should this new column be Flags and us be putting 'D' in there for instance?] Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]>

[Libhugetlbfs-devel] [PATCH 13/17] hugeadm: expose the available and possible page sizes

2008-10-10 Thread Andy Whitcroft
Expose possible page sizes. Expose the page sizes which are available (have pages assigned to them) via --page-sizes. Expose all possible page sizes (supported by the processor) via --page-sizes-all. Page sizes are listed in numerical order. Signed-off-by: Andy Whitcroft <[EMAIL PROTEC

[Libhugetlbfs-devel] [PATCH 03/17] Do not allow zero as an explicit page size

2008-10-10 Thread Andy Whitcroft
: Adam Litke <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeutils.c | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hugeutils.c b/hugeutils.c index 22ea4

[Libhugetlbfs-devel] [PATCH 05/17] hugeutils: pull out common filenames

2008-10-10 Thread Andy Whitcroft
Pull out all the common filenames and prefixes to a common set of defines. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- hugeutils.c | 16 ++-- 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hugeutils.c b

[Libhugetlbfs-devel] [PATCH 01/17] utils: Make pool counter manipulation code part of the library API

2008-10-10 Thread Andy Whitcroft
fixed up by the next patch. [EMAIL PROTECTED]: consolidate makefile updates in one place] Signed-off-by: Adam Litke <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h

[Libhugetlbfs-devel] [PATCH 06/17] build: allow utilities to consist of more than one file

2008-10-10 Thread Andy Whitcroft
Allow a utility control which source files it is made up of. This allows us to reuse some of the utility functions from within libhugetlbfs directly without linking against the library. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> -

[Libhugetlbfs-devel] [PATCH 04/17] hugeutils: size_to_smaller_unit should allow 2GB pages

2008-10-10 Thread Andy Whitcroft
we have all of the negative range available so it seems logical to use a negative value to indicate error. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Adam Litke <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- hugeutils.c | 10 --

[Libhugetlbfs-devel] [PATCH 09/17] hugeadm: expose the pool configuration

2008-10-10 Thread Andy Whitcroft
Expose pool allocations for each of the available page sizes via the --pool-list command. Exposes the miniumum and maximimum values indicating the dedicated pages and the size of the overcommit for all supported page sizes. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel

[Libhugetlbfs-devel] [PATCH 02/17] shm: Shared memory always uses the meminfo page size

2008-10-10 Thread Andy Whitcroft
From: Adam Litke <[EMAIL PROTECTED]> This patch fixes two intertwined issues: When the SHM_HUGETLB flag is passed to shmget(), the system default huge page size is used to back the shared memory segment. Unlike with mmap() there is not yet a way to use an alternate huge page size for shared memo

[Libhugetlbfs-devel] [PATCH 07/17] debug: allow utilities to share the common debug reporter

2008-10-10 Thread Andy Whitcroft
Where utilities are going to use routines out of the library directly it is helpful to share the debugging routines whilst maintaining the identity of the message producer. Allow the utilities to override the name shown. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Adam

[Libhugetlbfs-devel] [PATCH 08/17] hugeadm: initial basic framework

2008-10-10 Thread Andy Whitcroft
Add a very basic framework for hugeadm, the administrator pool configuration helper. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> Acked-by: Mel Gorman <[EMAIL PROTECTED]> --- Makefile |8 - hugeadm.c | 95 ++

[Libhugetlbfs-devel] [RFC PATCH 00/17] V3 hugeadm framework

2008-10-10 Thread Andy Whitcroft
stance we have just change the name to hugeadm. Comments? -apw Adam Litke (4): utils: Make pool counter manipulation code part of the library API shm: Shared memory always uses the meminfo page size Do not allow zero as an explicit page size lib: Add gethugepagesizes() API call An

Re: [Libhugetlbfs-devel] [PATCH 14/16] lib: add a getpagesizes call returning all page sizes

2008-10-10 Thread Andy Whitcroft
On Fri, Oct 10, 2008 at 02:23:14PM +0100, Mel Gorman wrote: > On (09/10/08 20:20), Andy Whitcroft didst pronounce: > > Utilise the new gethugepagesizes call to implement getpagesizes() call > > returning all page sizes on the system, both base page sizes and all > > hugepage s

Re: [Libhugetlbfs-devel] [PATCH 11/16] hpoolcfg: allow pools to be resized

2008-10-10 Thread Andy Whitcroft
On Fri, Oct 10, 2008 at 12:22:40PM +0100, Mel Gorman wrote: > On (09/10/08 20:20), Andy Whitcroft didst pronounce: > > Allow resize of specific pools via the --pool-minimum-adjust and > > --pool-maximum-adjust commands. The first affects the number of static > > pages in

Re: [Libhugetlbfs-devel] [PATCH 11/16] hpoolcfg: allow pools to be resized

2008-10-10 Thread Andy Whitcroft
On Fri, Oct 10, 2008 at 12:29:47PM +0100, Mel Gorman wrote: [...] > > + if (adjust_str[0] == '+' || adjust_str[0] == '-') { > > + > > + /* > > +* XXX: reading HUGEPAGES_TOTAL gives you the total pages > > +* in use not what you wrote. > > +*/ > > +

Re: [Libhugetlbfs-devel] [PATCH 10/16] hugeutils: export the pool counter update interface

2008-10-10 Thread Andy Whitcroft
On Fri, Oct 10, 2008 at 12:17:28PM +0100, Mel Gorman wrote: > On (09/10/08 20:20), Andy Whitcroft didst pronounce: > > Rename and export the pool counter update interface. > > > > Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> > > --- > > hugetl

Re: [Libhugetlbfs-devel] [PATCH 09/16] hpoolcfg: expose the pool configuration

2008-10-10 Thread Andy Whitcroft
On Fri, Oct 10, 2008 at 12:09:07PM +0100, Mel Gorman wrote: > On (09/10/08 20:20), Andy Whitcroft didst pronounce: > > Expose pool allocations for each of the available page sizes via the > > --pool-list command. Exposes the miniumum and maximimum values indicating > > the de

Re: [Libhugetlbfs-devel] [PATCH 01/16] utils: Make pool counter manipulation code part of the library API

2008-10-10 Thread Andy Whitcroft
On Fri, Oct 10, 2008 at 11:00:51AM +0100, Mel Gorman wrote: > On (09/10/08 20:20), Andy Whitcroft didst pronounce: > > From: Adam Litke <[EMAIL PROTECTED]> > > > > The need to set and get pool counters for multiple huge page sizes is about > > to > > ex

[Libhugetlbfs-devel] [PATCH 1/1] hugeedit: report any unparsed options

2008-10-09 Thread Andy Whitcroft
Ensure we report any unparsed options that getopts_long recognises but which have no implementation. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugeedit.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hugeedit.c b/hugeedit.c index 2785200..17b052c

Re: [Libhugetlbfs-devel] [PATCH 3/3] hugectl: suppress false warning at the end of all arguments

2008-10-09 Thread Andy Whitcroft
On Thu, Oct 09, 2008 at 09:05:08AM -0500, Adam Litke wrote: > On Thu, 2008-10-09 at 11:47 +0100, Andy Whitcroft wrote: > > When we hit the end of the arguments we will get a valid -1 return > > from getopts_long. We should suppress this to prevent confusion. > > Does this af

[Libhugetlbfs-devel] [PATCH 11/16] hpoolcfg: allow pools to be resized

2008-10-09 Thread Andy Whitcroft
in --pool-list. Adjustments are either absolute, or relative with a + or - prefix. For exmaple the following incantion increases the 2MB page pool minimum by 10 pages. --pool-minimum-adjust 2048kb:+10 Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hpoolcfg.c

[Libhugetlbfs-devel] [PATCH 12/16] hpoolcfg: expose the available and possible page sizes

2008-10-09 Thread Andy Whitcroft
Expose possible page sizes. Expose the page sizes which are available (have pages assigned to them) via --page-sizes. Expose all possible page sizes (supported by the processor) via --page-sizes-all. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hpoolcfg.c

[Libhugetlbfs-devel] [PATCH 10/16] hugeutils: export the pool counter update interface

2008-10-09 Thread Andy Whitcroft
Rename and export the pool counter update interface. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- hugetlbfs.h |2 ++ hugeutils.c | 28 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/hugetlbfs.h b/hugetlbfs.h index 2103515..f

  1   2   3   >