On (31/07/08 16:01), Andy Whitcroft didst pronounce:
> This is a further revision of the basic hugectl support incorporating
> further feedback, and a number of other cleanups which came out of the
> work to address them.  This is based on the current master which includes
> my cleanup stack 'hugectl cleanups II (V1)'.  This is probababally about
> ready for merging, after the v2.0 release.
> 
> It might make sense to start building a branch with all these new things so
> we can test against it, like a testing branch.
> 

I am happy with everything in this patchset now at least. It represents
a lot of very useful functionality that we should be happy to maintain
in a backwards-compatible fashion.

> Changelog:
> 
> V7:
>  - fix miss merge with hugeedit build changes
> 
> V6:
>  - fix miss un-merge of the library suppression
> 
> V5:
>  - added in collected acks
>  - option --library -> --library-path
>  - library path support for both single directories and library prefix
>  - split out the library fallback support
> 
> V4:
>  - separate out cleanups into their own series
>  - all new option help specification
>  - option --explain becomes --dry-run
>  - option --no-library becomes --library-use-path
> 
> V3:
>  - abstract out the verbosity levels
>  - cleanup and abstract long option values
>  - always indicate environmental variables as they are set
>  - library path defaults to set, and may be suppressed
>  - adds --explain to expose configuration
> 
> V2:
>  - incorporate community feedback
> 
> ====
> 
> I have been looking at adding basic functionality to hugectl.  Following
> on from my cleanup series this patch set adds basic remap functionality
> to hugectl.  The short version of the story is that it adds options to
> request backing of the text, data, bss, and heap as first class options
> and simplifies preload handling, library path specification, and exposes
> configuration on request.
> 
> The main driver for hugectl is to simplify the use of hugepages as
> exported through the libhugetlbfs library.  Specifically we should be
> trying to do what the user means where possible.  This patch set brings
> basic support for requesting remap and/or backing of the various elements
> program elements supported by libhugetlbfs.  This includes the request
> of remap of the various program segments, as well as requesting the heap
> (malloc space) be backed.  Where appropriate it tries to configure preload
> of the library.
> 
> When considering the current configuration the clearest anomoly seems to be
> the difference in handling of normal program segments and malloc.  From a
> user point of view hugepages are something which I use for something,
> to back something.  Backing my text with hugepages or my malloc space
> with hugepages are the same thing.  That is I have a bunch of things,
> text, data, bss, malloc all of which I may wish or not wish to back
> with hugepages.  The underlying implementation differences are hidden by
> exposing each as its own option, all at the same level.
> 
>       hugectl --text
>       hugectl --data --bss
>       hugectl --heap
>       hugectl --stack                 (for illustrative purposes only)
>       hugectl --disable
> 
> Note that while each thing is separately specified, in reality only certain
> combinations are valid.  Where the user specifies a bad combination it
> is "widened" to a valid combination which includes their request and a
> warning is emitted.  This helps to get the user going and is part of the
> DWIM approach.
> 
> Preloading is a little tricky as it is only useful where the binary
> is not-prelinked and only there is we are only asking for the heap to
> be backed.  But in that combination we can always preload safely which should
> remove the need to every conciously request it.  In case it is a problem
> we allow it to be suppressed via --no-preload.
> 
> Finally it is helpful to be able to see the options in use for any
> particular combination of arguments, expose this via --explain.
> 
> This stack consists of 6 patches:
> 
> hugectl: honour the hugetlb verbosity/debug flags -- reads the standard
>   libhugetlbfs verbosity and debug control flags and supplies compatible
>   error and warning routines,
> 
> hugectl: add remap support via --text, --data, --bss, and --disable --
>   which adds basic remap support via separated options,
> 
> hugectl: add backing of the heap via --heap -- which adds heap remapping
>   via --heap,
> 
> hugectl: add support for preload -- where preload is appropriate request
>   preloading of the library,
> 
> hugectl: explain the hugetlb configuration selected via --explain --
>  which allow exposure of the variable settings for a specific command line.
> 
> hugectl: add support for requesting which library to use -- providing
>   an override for the normal library path allowing clean execution in
>   non-standard installs, and
> 
> hugectl: allow suppression of the library path -- allow all library path
>  modification to be suppressed.
> 
> Thanks for Nish, Adam, Mel, David and Andrew for feedback during this
> process.
> 
> Comments?
> 
> -apw
> 
> Andy Whitcroft (7):
>   hugectl: honour the hugetlb verbosity/debug flags
>   hugectl: add remap support via --text, --data, --bss, and --disable
>   hugectl: add backing of the heap via --heap
>   hugectl: add support for preload
>   hugectl: add a --dry-run option to dump what would be done
>   hugectl: add support for requesting which library to use
>   hugectl: allow suppression of the library path
> 
>  Makefile  |    9 ++-
>  hugectl.c |  238 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 243 insertions(+), 4 deletions(-)
> 

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to