Re: [Libhugetlbfs-devel] [RFC][PATCH] disable heap shrinking by default

2008-02-27 Thread Andrew Hastings
David Gibson wrote: > On Wed, Feb 20, 2008 at 03:43:08PM -0600, Andrew Hastings wrote: >> David Gibson wrote: >>> On Thu, Feb 14, 2008 at 11:48:42AM -0600, Andrew Hastings wrote: Disable heap shrinking by default unless HUGETLB_MORECORE_SHRINK=yes is set in the environment. If m

[Libhugetlbfs-devel] [PATCH] Add configuration information to the HOWTO

2008-02-27 Thread Nishanth Aravamudan
For new users of libhugetlbfs, the requirements of configuring the hugepage pool and mounting hugetlbfs should be made explicit. Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> diff --git a/HOWTO b/HOWTO index a10461b..3998ef1 100644 --- a/HOWTO +++ b/HOWTO @@ -99,6 +99,42 @@ to use both g

Re: [Libhugetlbfs-devel] [PATCH] Add configuration information to the HOWTO

2008-02-27 Thread Andrew Hastings
Nishanth Aravamudan wrote: > +To use libhugetlbfs features, as well as to run the testsuite, hugetlbfs > +must be mounted: > + > + mkdir -p /mnt/hugetlbfs > + mount -t hugetlbfs none /mnt/hugetlbfs > + > +If hugepages should be available to non-root users, the permissions on > +the mountpo

Re: [Libhugetlbfs-devel] Lnux 2.6.24-rc5

2008-02-27 Thread Nishanth Aravamudan
On 22.02.2008 [18:35:53 +0530], Subrata Modak wrote: > > We maintain a set of detailed functionality tests for hugepages in > > libhugetlbfs. Any time you are looking for new tests to add to LTP, > > feel free to check the source code. > > Adam/Nishant, > > I am not sure if i found the test case

[Libhugetlbfs-devel] [PATCH] libhugetlbfs: consolidate to one constructor

2008-02-27 Thread Nishanth Aravamudan
On 22.02.2008 [14:20:13 -0600], Andrew Hastings wrote: > Nish, > > Thanks for the review! > Glad you suggested this! It turns out there's a dependency on the order in > which the three libhugetlbfs constructors run, which in turns depends on > the order the objects appear in the link line. I

[Libhugetlbfs-devel] [PATCH] debug: make HUGETLB_DEBUG generic

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [13:29:24 -0800], Nishanth Aravamudan wrote: > On 22.02.2008 [14:20:13 -0600], Andrew Hastings wrote: > > Nish, > > > > Thanks for the review! > > > > > Glad you suggested this! It turns out there's a dependency on the order in > > which the three libhugetlbfs constructors run, w

Re: [Libhugetlbfs-devel] [PATCH] libhugetlbfs: consolidate to one constructor

2008-02-27 Thread Andrew Hastings
Nish, Thanks! You beat me to it! Nishanth Aravamudan wrote: > --- /dev/null > +++ b/init.c > @@ -0,0 +1,8 @@ > +#include "libhugetlbfs_internal.h" > + > +static void __attribute__ ((constructor)) setup_libhugetlbfs(void) > +{ > + setup_morecore(); > + setup_elflink(); > + setup_debug

Re: [Libhugetlbfs-devel] [PATCH] debug: make HUGETLB_DEBUG generic

2008-02-27 Thread Andrew Hastings
Nish, Nice! Just one comment: Nishanth Aravamudan wrote: > --- a/libhugetlbfs_internal.h > +++ b/libhugetlbfs_internal.h > @@ -29,6 +29,7 @@ > #define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) > > extern int __hugetlbfs_verbose; > +extern int __debug; This should be __hugetlbfs_debug to a

[Libhugetlbfs-devel] [PATCH] morecore.c: eliminate use of mlock()

2008-02-27 Thread Andrew Hastings
hugetlbfs_morecore() is currently calling mlock() presumably to instantiate newly-mapped hugepages before returning to malloc(). However, this is ineffective for two reasons: 1. The return value of mlock is ignored. If there aren't enough hugepages available, the process may be killed later,

[Libhugetlbfs-devel] [PATCH] morecore: dump /proc/pid/maps when the heap is forced to move and DEBUG

2008-02-27 Thread Nishanth Aravamudan
morecore: dump /proc/pid/maps when the heap is forced to move and DEBUG If HUGETLB_DEBUG is set in the environment, use a new helper function, dump_proc_pid_maps() to indicate the address space layout. This is very useful in finding out *why* the hugepage heap cannot be placed where we'd like it.

[Libhugetlbfs-devel] [PATCH] elflink: filter extracopy on GLIBC symbols

2008-02-27 Thread Nishanth Aravamudan
I found that when using OpenMPI with libhugetlbfs there is a gigantic symbol in the BSS. From readelf -a: 81: 120048b0 6caf2d0 OBJECT GLOBAL DEFAULT 26fields This object is almost 109M in size! But because it is an OBJECT type and GLOBAL, we copy it in the extracopy lo

[Libhugetlbfs-devel] [PATCH] elflink: emit symbol name when extracopy symbols are found

2008-02-27 Thread Nishanth Aravamudan
To ease with debugging, output the address and name of extra symbols to copy from within the BSS. Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> diff --git a/elflink.c b/elflink.c index aaec4a2..427f8c3 100644 --- a/elflink.c +++ b/elflink.c @@ -421,6 +421,10 @@ static inline int keep_sym

[Libhugetlbfs-devel] [PATCH] DEBUG overrides VERBOSE checks

2008-02-27 Thread Nishanth Aravamudan
For debugging purposes, setting HUGETLB_DEBUG should be sufficient. It should also imply maximum verbosity from the library, so spit out all types of messages (DEBUG, WARNING or ERROR). Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> diff --git a/libhugetlbfs_internal.h b/libhugetlbfs_inte

[Libhugetlbfs-devel] [PATCH][UPDATED] libhugetlbfs: consolidate to one constructor

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [15:46:47 -0600], Andrew Hastings wrote: > Nish, > > Thanks! You beat me to it! > > Nishanth Aravamudan wrote: >> --- /dev/null >> +++ b/init.c >> @@ -0,0 +1,8 @@ >> +#include "libhugetlbfs_internal.h" >> + >> +static void __attribute__ ((constructor)) setup_libhugetlbfs(void) >> +{

[Libhugetlbfs-devel] [PATCH][UPDATED] debug: make HUGETLB_DEBUG generic

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [15:48:24 -0600], Andrew Hastings wrote: > Nish, > > Nice! Just one comment: > > Nishanth Aravamudan wrote: >> --- a/libhugetlbfs_internal.h >> +++ b/libhugetlbfs_internal.h >> @@ -29,6 +29,7 @@ >> #define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) >> extern int __hugetlbfs_verbos

[Libhugetlbfs-devel] [PATCH][UPDATED] morecore: dump /proc/pid/maps when the heap is force to move and DEBUG

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [14:23:18 -0800], Nishanth Aravamudan wrote: > morecore: dump /proc/pid/maps when the heap is forced to move and DEBUG > > If HUGETLB_DEBUG is set in the environment, use a new helper function, > dump_proc_pid_maps() to indicate the address space layout. This is very > useful in find

[Libhugetlbfs-devel] [PATCH][UPDATED] DEBUG overrides VERBOSE checks

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [14:43:38 -0800], Nishanth Aravamudan wrote: > For debugging purposes, setting HUGETLB_DEBUG should be sufficient. It > should also imply maximum verbosity from the library, so spit out all > types of messages (DEBUG, WARNING or ERROR). Update to new name for __debug: DEBUG override

[Libhugetlbfs-devel] [PATCH] elflink: emit symbol name when extracopy symbols are found

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [14:43:04 -0800], Nishanth Aravamudan wrote: > To ease with debugging, output the address and name of extra symbols to > copy from within the BSS. Update to new name for __debug: elflink: emit symbol name when extracopy symbols are found To ease with debugging, output the address a

[Libhugetlbfs-devel] [PATCH] elflink: emit symbol name when extracopy symbols are found

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [15:23:36 -0800], Nishanth Aravamudan wrote: > On 27.02.2008 [14:43:04 -0800], Nishanth Aravamudan wrote: > > To ease with debugging, output the address and name of extra symbols to > > copy from within the BSS. > > Update to new name for __debug: This introduced a warning actually,

Re: [Libhugetlbfs-devel] [PATCH][UPDATED] debug: make HUGETLB_DEBUG generic

2008-02-27 Thread Andrew Hastings
Nishanth Aravamudan wrote: > On 27.02.2008 [15:48:24 -0600], Andrew Hastings wrote: >> Nish, >> >> Nice! Just one comment: >> >> Nishanth Aravamudan wrote: >>> --- a/libhugetlbfs_internal.h >>> +++ b/libhugetlbfs_internal.h >>> @@ -29,6 +29,7 @@ >>> #define ALIGN(x, a)(((x) + (a) - 1) & ~

Re: [Libhugetlbfs-devel] [PATCH][UPDATED] libhugetlbfs: consolidate to one constructor

2008-02-27 Thread Andrew Hastings
Nishanth Aravamudan wrote: > On 27.02.2008 [15:46:47 -0600], Andrew Hastings wrote: >> Nishanth Aravamudan wrote: >>> --- /dev/null >>> +++ b/init.c >>> @@ -0,0 +1,8 @@ >>> +#include "libhugetlbfs_internal.h" >>> + >>> +static void __attribute__ ((constructor)) setup_libhugetlbfs(void) >>> +{ >>> +

Re: [Libhugetlbfs-devel] [PATCH] morecore.c: eliminate use of mlock()

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [16:12:14 -0600], Andrew Hastings wrote: > hugetlbfs_morecore() is currently calling mlock() presumably to > instantiate newly-mapped hugepages before returning to malloc(). > > However, this is ineffective for two reasons: > 1. The return value of mlock is ignored. If there aren't

Re: [Libhugetlbfs-devel] [PATCH] morecore.c: eliminate use of mlock()

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [17:02:15 -0800], Nishanth Aravamudan wrote: > On 27.02.2008 [16:12:14 -0600], Andrew Hastings wrote: > > hugetlbfs_morecore() is currently calling mlock() presumably to > > instantiate newly-mapped hugepages before returning to malloc(). > > > > However, this is ineffective for two

[Libhugetlbfs-devel] [RFC] Release plans...

2008-02-27 Thread Nishanth Aravamudan
So, with the 6-patch drop I did today, we have between 23 and 29 patches post 1.2. How are folks feeling about that? I am starting to lean towards cutting a 1.3-rc0 release to start that cycle going. There are a few threatened features, though: * Andrew's HUGETLB_STACK set pros -

Re: [Libhugetlbfs-devel] [PATCH][UPDATED] debug: make HUGETLB_DEBUG generic

2008-02-27 Thread David Gibson
On Wed, Feb 27, 2008 at 03:15:14PM -0800, Nishanth Aravamudan wrote: > On 27.02.2008 [15:48:24 -0600], Andrew Hastings wrote: > > Nish, > > > > Nice! Just one comment: > > > > Nishanth Aravamudan wrote: > >> --- a/libhugetlbfs_internal.h > >> +++ b/libhugetlbfs_internal.h > >> @@ -29,6 +29,7 @@ >

Re: [Libhugetlbfs-devel] [RFC][PATCH] disable heap shrinking by default

2008-02-27 Thread David Gibson
On Tue, Feb 26, 2008 at 12:11:56AM -0800, Nishanth Aravamudan wrote: > On 26.02.2008 [16:16:01 +1100], David Gibson wrote: > > On Mon, Feb 25, 2008 at 09:05:42PM -0800, Nishanth Aravamudan wrote: > > > On 26.02.2008 [15:33:55 +1100], David Gibson wrote: > > > > On Mon, Feb 25, 2008 at 08:23:48PM -0

Re: [Libhugetlbfs-devel] [PATCH][UPDATED] libhugetlbfs: consolidate to one constructor

2008-02-27 Thread David Gibson
On Wed, Feb 27, 2008 at 03:13:20PM -0800, Nishanth Aravamudan wrote: > On 27.02.2008 [15:46:47 -0600], Andrew Hastings wrote: > > Nish, > > > > Thanks! You beat me to it! > > > > Nishanth Aravamudan wrote: > >> --- /dev/null > >> +++ b/init.c > >> @@ -0,0 +1,8 @@ > >> +#include "libhugetlbfs_inter

Re: [Libhugetlbfs-devel] [RFC][PATCH] disable heap shrinking by default

2008-02-27 Thread Nishanth Aravamudan
On 28.02.2008 [13:00:34 +1100], David Gibson wrote: > On Tue, Feb 26, 2008 at 12:11:56AM -0800, Nishanth Aravamudan wrote: > > On 26.02.2008 [16:16:01 +1100], David Gibson wrote: > > > On Mon, Feb 25, 2008 at 09:05:42PM -0800, Nishanth Aravamudan wrote: > > > > On 26.02.2008 [15:33:55 +1100], David

Re: [Libhugetlbfs-devel] [PATCH][UPDATED] debug: make HUGETLB_DEBUG generic

2008-02-27 Thread Nishanth Aravamudan
On 28.02.2008 [12:47:08 +1100], David Gibson wrote: > On Wed, Feb 27, 2008 at 03:15:14PM -0800, Nishanth Aravamudan wrote: > > On 27.02.2008 [15:48:24 -0600], Andrew Hastings wrote: > > > Nish, > > > > > > Nice! Just one comment: > > > > > > Nishanth Aravamudan wrote: > > >> --- a/libhugetlbfs_int

Re: [Libhugetlbfs-devel] [PATCH][UPDATED] libhugetlbfs: consolidate to one constructor

2008-02-27 Thread Nishanth Aravamudan
On 28.02.2008 [12:43:13 +1100], David Gibson wrote: > On Wed, Feb 27, 2008 at 03:13:20PM -0800, Nishanth Aravamudan wrote: > > On 27.02.2008 [15:46:47 -0600], Andrew Hastings wrote: > > > Nish, > > > > > > Thanks! You beat me to it! > > > > > > Nishanth Aravamudan wrote: > > >> --- /dev/null > > >

Re: [Libhugetlbfs-devel] [RFC][PATCH] disable heap shrinking by default

2008-02-27 Thread David Gibson
On Wed, Feb 27, 2008 at 11:29:03AM -0600, Andrew Hastings wrote: > David Gibson wrote: > > On Wed, Feb 20, 2008 at 03:43:08PM -0600, Andrew Hastings wrote: > >> David Gibson wrote: > >>> On Thu, Feb 14, 2008 at 11:48:42AM -0600, Andrew Hastings wrote: > Disable heap shrinking by default unless

Re: [Libhugetlbfs-devel] [RFC][PATCH] disable heap shrinking by default

2008-02-27 Thread David Gibson
On Wed, Feb 27, 2008 at 06:17:02PM -0800, Nishanth Aravamudan wrote: > On 28.02.2008 [13:00:34 +1100], David Gibson wrote: > > On Tue, Feb 26, 2008 at 12:11:56AM -0800, Nishanth Aravamudan wrote: > > > On 26.02.2008 [16:16:01 +1100], David Gibson wrote: > > > > On Mon, Feb 25, 2008 at 09:05:42PM -0

Re: [Libhugetlbfs-devel] [RFC][PATCH] disable heap shrinking by default

2008-02-27 Thread Nishanth Aravamudan
On 28.02.2008 [13:28:47 +1100], David Gibson wrote: > On Wed, Feb 27, 2008 at 06:17:02PM -0800, Nishanth Aravamudan wrote: > > On 28.02.2008 [13:00:34 +1100], David Gibson wrote: > > > On Tue, Feb 26, 2008 at 12:11:56AM -0800, Nishanth Aravamudan wrote: > > > > On 26.02.2008 [16:16:01 +1100], David

Re: [Libhugetlbfs-devel] [RFC][PATCH] disable heap shrinking by default

2008-02-27 Thread David Gibson
On Wed, Feb 27, 2008 at 06:34:37PM -0800, Nishanth Aravamudan wrote: > On 28.02.2008 [13:28:47 +1100], David Gibson wrote: > > On Wed, Feb 27, 2008 at 06:17:02PM -0800, Nishanth Aravamudan wrote: [snip] > > > Hrm, I guess I hadn't thought about it that way. I really am curious > > > about these sem

Re: [Libhugetlbfs-devel] [RFC][PATCH] disable heap shrinking by default

2008-02-27 Thread Nishanth Aravamudan
On 28.02.2008 [13:55:58 +1100], David Gibson wrote: > On Wed, Feb 27, 2008 at 06:34:37PM -0800, Nishanth Aravamudan wrote: > > On 28.02.2008 [13:28:47 +1100], David Gibson wrote: > > > On Wed, Feb 27, 2008 at 06:17:02PM -0800, Nishanth Aravamudan wrote: > [snip] > > > > Hrm, I guess I hadn't though

Re: [Libhugetlbfs-devel] [RFC][PATCH] disable heap shrinking by default

2008-02-27 Thread Nishanth Aravamudan
On 27.02.2008 [23:20:35 -0800], Nishanth Aravamudan wrote: > On 28.02.2008 [13:55:58 +1100], David Gibson wrote: > > On Wed, Feb 27, 2008 at 06:34:37PM -0800, Nishanth Aravamudan wrote: > > > On 28.02.2008 [13:28:47 +1100], David Gibson wrote: > > > > On Wed, Feb 27, 2008 at 06:17:02PM -0800, Nisha