Mailinglist Archive: opensuse-commit (1670 mails)

< Previous Next >
commit libhugetlbfs
  • From: root@xxxxxxx (h_root)
  • Date: Mon, 9 Oct 2006 18:54:29 +0200 (CEST)
  • Message-id: <20061009165429.7D670193DA0@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package libhugetlbfs
checked in at Mon Oct 9 18:54:29 CEST 2006.

--------
--- libhugetlbfs/libhugetlbfs.changes 2006-09-19 12:58:16.000000000 +0200
+++ /mounts/work_src_done/STABLE/libhugetlbfs/libhugetlbfs.changes 2006-10-05 13:40:28.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Oct 5 13:40:17 CEST 2006 - olh@xxxxxxx
+
+- update to final 1.0
+
+-------------------------------------------------------------------

Old:
----
libhugetlbfs-20060913.tar.gz

New:
----
libhugetlbfs-1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libhugetlbfs.spec ++++++
--- /var/tmp/diff_new_pack.7at4IH/_old 2006-10-09 18:54:18.000000000 +0200
+++ /var/tmp/diff_new_pack.7at4IH/_new 2006-10-09 18:54:18.000000000 +0200
@@ -16,11 +16,10 @@
Group: Development/Libraries/Other
Summary: hugetlbfs helper library
Version: 1.0
-Release: 21
+Release: 24
URL: http://libhugetlbfs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-PreReq: %install_info_prereq
-Source0: libhugetlbfs-20060913.tar.gz
+Source0: libhugetlbfs-1.0.tar.gz
Patch0: libhugetlbfs.install.patch
Patch1: libhugetlbfs.ldscript-path.patch

@@ -36,7 +35,7 @@
Adam Litke <agl@xxxxxxxxxx>

%prep
-%setup -q -n libhugetlbfs-20060913
+%setup -q
%patch0 -p1
%patch1 -p1

@@ -77,6 +76,8 @@
%{_libdir}/lib*

%changelog -n libhugetlbfs
+* Thu Oct 05 2006 - olh@xxxxxxx
+- update to final 1.0
* Tue Sep 19 2006 - olh@xxxxxxx
- update to 20060913 git state
docu updates

++++++ libhugetlbfs-20060913.tar.gz -> libhugetlbfs-1.0.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/.gitHEAD new/libhugetlbfs-1.0/.gitHEAD
--- old/libhugetlbfs-20060913/.gitHEAD 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/.gitHEAD 2006-10-04 17:16:17.000000000 +0200
@@ -0,0 +1 @@
+e64c667c3f04c3039f8b7b1e0f28c48171285773
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/HOWTO new/libhugetlbfs-1.0/HOWTO
--- old/libhugetlbfs-20060913/HOWTO 2006-09-13 20:53:17.000000000 +0200
+++ new/libhugetlbfs-1.0/HOWTO 2006-10-04 17:16:15.000000000 +0200
@@ -2,7 +2,7 @@
==================

Author: David Gibson <dwg@xxxxxxxxxxx>, Adam Litke <agl@xxxxxxxxxx>, and others
-Last updated: Wednesday, 1st March 2006
+Last updated: Monday, September 25th 2006

Introduction
============
@@ -25,7 +25,7 @@
* hugepage text/data/BSS
libhugetlbfs, in conjunction with included special linker scripts can
be used to make an application which will store its executable text,
-it's initialized or BSS or all of the above in hugepages. This
+its initialized data or BSS, or all of the above in hugepages. This
requires relinking an application, but does not require source-level
modifications.

@@ -179,7 +179,7 @@
Usually it's preferable to set these environment variables on the
command line of the program you wish to run, rather than using
"export", because you'll only want to enable the hugepage malloc() for
-particular programs not everything.
+particular programs, not everything.

Examples:

@@ -196,9 +196,9 @@
Under some circumstances, you might want to specify the address where
the hugepage heap is located. You can do this by setting the
HUGETLB_MORECORE_HEAPBASE environment variable to the heap address in
-hexadecimal. (NOTE: this will not be work on PowerPC systems with old
-kernels which don't respect the hugepage hint address; see Kernel
-Prerequisites above).
+hexadecimal. (NOTE: this will not work on PowerPC systems with old kernels
+which don't respect the hugepage hint address; see Kernel Prerequisites
+above).

By default, the hugepage heap begins at roughly the same place a
normal page heap would, rounded up by an amount determined by your
@@ -260,27 +260,23 @@
linker, rather than modifying your build procedure to invoke the
ld.hugetlbfs directly; the compilers may often add special libraries
or other linker options which can be fiddly to reproduce by hand.
+To make this easier, 'make install' will install ld.hugetlbfs into
+$PREFIX/share/libhugetlbfs and create an 'ld' symlink to it.

-To do this with gcc, you will need a copy of the ld.hugetlbfs script
-(or a symbolic link to it) with the name 'ld' - gcc always expects the
-linker to be called "ld". If you do this in a directory in your path
-you will effectively replace your normal ld with the ld.hugetlbfs
-script for all links (this is safe, because ld.hugetlbfs just invokes
-the linker normally if it's not given the --hugetblfs-link option).
-
-Once you have a suitable copy of the ld.hugetlbfs script, invoke gcc
-as a linker with two options:
- -B /path/to/renamed/ld.hugetlbfs/script
-This option tells gcc to look in a nonstandard location for the
-linker, thus finding your renamed script rather than the normal
-linker. If you put your renamed linker in the PATH, you can skip this
-option.
+Then with gcc, you invoke it as a linker with two options:
+
+ -B $PREFIX/share/libhugetlbfs
+
+This option tells gcc to look in a non-standard location for the
+linker, thus finding our script rather than the normal linker. This
+can optionally be set in the CFLAGS environment variable.

-Wl,--hugetlbfs-link=B
OR -Wl,--hugetlbfs-link=BDT
+
This option instructs gcc to pass the --hugetblfs-link option down to
the linker, thus invoking the special behaviour of the ld.hugetblfs
-script.
+script. This can optionally be set in the LDFLAGS environment variable.

If you use a compiler other than gcc, you will need to consult its
documentation to see how to convince it to invoke ld.hugetlbfs in
@@ -294,7 +290,7 @@
application can locate libhugetlbfs.so. Other than that, after you
link the application with the correct script, it should only be
necessary to run it normally to activate the text, data, or BSS
-hugepage feature. Upon initialisation, libhugetlbfs will detect the
+hugepage feature. Upon initialization, libhugetlbfs will detect the
special flags placed in the application's ELF header by the linker,
and remap the requested program segments into hugepages.

@@ -330,10 +326,10 @@
Sharing of program segments among processes is a two-fold process.

First, a system-wide daemon must be started, hugetlbd. The executable
-(which will be installed into /usr/sbin by make install) should be run
-as root and will automatically spawn a child process to wait for segment
-sharing into the background. The process will log any output requested
-to /tmp/hugetlbd.log. The complete usage for hugetlbd is:
+(which will be installed into $PREFIX/sbin by make install) should be
+run as root and will automatically spawn a child process to wait for
+segment sharing into the background. The process will log any output
+requested to /tmp/hugetlbd.log. The complete usage for hugetlbd is:

hugetlbd [-v] [-V verbosity] [-p timeout1] [-s timeout2]
-v: display this help and exit
@@ -396,17 +392,6 @@
Troubleshooting
===============

-The library has some debugging code built in, which you can control
-with the HUGETLB_VERBOSE environment variable. By default the debug
-level is 1, which means the library will only print relatively serious
-error messages. Setting HUGETLB_VERBOSE=2 or higher will enable more
-debug messages (2 is the highest debug level, thus far). Setting
-HUGETLB_VERBOSE=0 will silence the library completely, even in the
-case of errors; the only exception is in cases where the library has
-to abort(), which can happen if something goes wrong in the middle of
-unmapping and remapping segments for the text, data, or BSS feature.
-
-
The library has a certain amount of debugging code built in, which can
be controlled with the environment variable HUGETLB_VERBOSE. By
default the debug level is "1" which means the library will only print
@@ -417,6 +402,7 @@
exception is in cases where the library has to abort(), which can
happen if something goes wrong in the middle of unmapping and
remapping segments for the text/data/bss feature.
+
Trademarks
==========

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/Makefile new/libhugetlbfs-1.0/Makefile
--- old/libhugetlbfs-20060913/Makefile 2006-09-13 20:53:17.000000000 +0200
+++ new/libhugetlbfs-1.0/Makefile 2006-10-04 17:16:15.000000000 +0200
@@ -1,14 +1,19 @@
PREFIX = /usr/local

-LIBOBJS = hugeutils.o elflink.o morecore.o debug.o
+BASEOBJS = hugeutils.o version.o
+LIBOBJS = $(BASEOBJS) elflink.o morecore.o debug.o
SBINOBJS = hugetlbd
INSTALL_OBJ_LIBS = libhugetlbfs.so libhugetlbfs.a
LDSCRIPT_TYPES = B BDT
INSTALL_OBJSCRIPT = ld.hugetlbfs
+VERSION=version.h
+SOURCE = $(shell find . -maxdepth 1 ! -name version.h -a -name '*.[h]')
+SOURCE += *.c *.lds Makefile
+NODEPTARGETS=<version.h> <clean>

INSTALL = install

-LDFLAGS = --no-undefined-version -Wl,--version-script=VERSION
+LDFLAGS = --no-undefined-version -Wl,--version-script=version.lds
CFLAGS = -O2 -Wall -fPIC -g
CPPFLAGS = -D__LIBHUGETLBFS__

@@ -57,8 +62,8 @@

LIBDIR32 = $(DESTDIR)$(PREFIX)/$(LIB32)
LIBDIR64 = $(DESTDIR)$(PREFIX)/$(LIB64)
-LDSCRIPTDIR = $(PREFIX)/$(LIB32)/ldscripts
-BINDIR = $(DESTDIR)$(PREFIX)/bin
+LDSCRIPTDIR = $(PREFIX)/share/libhugetlbfs/ldscripts
+BINDIR = $(DESTDIR)$(PREFIX)/share/libhugetlbfs
SBINDIR = $(DESTDIR)$(PREFIX)/sbin
DOCDIR = $(DESTDIR)$(PREFIX)/share/doc/libhugetlbfs

@@ -119,6 +124,14 @@
$(OBJDIRS): %:
@mkdir -p $@

+# <Version handling>
+$(VERSION): always
+ @$(VECHO) VERSION
+ ./localversion version $(SOURCE)
+always:
+# </Version handling>
+
+snapshot: $(VERSION)

.SECONDARY:

@@ -160,26 +173,32 @@
@$(VECHO) CC64 -S $@
$(CC64) $(CPPFLAGS) $(CFLAGS) -o $@ -S $<

-obj32/hugetlbd: hugetlbd.c $(LIBOBJS:%=obj32/%)
+obj32/hugetlbd: hugetlbd.c $(BASEOBJS:%=obj32/%)
@$(VECHO) CC32 $@
- $(CC32) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS32) -o $@ obj32/hugeutils.o $<
+ $(CC32) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS32) -o $@ $^

-obj64/hugetlbd: hugetlbd.c $(LIBOBJS:%=obj64/%)
+obj64/hugetlbd: hugetlbd.c $(BASEOBJS:%=obj64/%)
@$(VECHO) CC64 $@
- $(CC64) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS64) -o $@ obj64/hugeutils.o $<
+ $(CC64) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS64) -o $@ $^

clean:
@$(VECHO) CLEAN
- rm -f *~ *.o *.so *.a *.d *.i core a.out
+ rm -f *~ *.o *.so *.a *.d *.i core a.out $(VERSION)
rm -rf obj*
rm -f ldscripts/*~
rm -f libhugetlbfs-sock
$(MAKE) -C tests clean

-%.d: %.c
+%.d: %.c $(VERSION)
@$(CC) $(CPPFLAGS) -MM -MT "$(foreach DIR,$(OBJDIRS),$(DIR)/$*.o) $@" $< > $@

+# Workaround: Don't build dependencies for certain targets
+# When the include below is executed, make will use the %.d target above to
+# generate missing files. For certain targets (clean, version.h, etc) we don't
+# need or want these dependency files, so don't include them in this case.
+ifeq (,$(findstring <$(MAKECMDGOALS)>,$(NODEPTARGETS)))
-include $(DEPFILES)
+endif

obj32/install:
@$(VECHO) INSTALL32 $(LIBDIR32)
@@ -206,6 +225,7 @@
$(INSTALL) -d $(BINDIR)
for x in $(INSTALL_OBJSCRIPT); do \
$(INSTALL) -m 755 objscript.$$x $(BINDIR)/$$x; done
+ cd $(BINDIR) && ln -sf ld.hugetlbfs ld

install-docs:
$(INSTALL) -d $(DOCDIR)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/README new/libhugetlbfs-1.0/README
--- old/libhugetlbfs-20060913/README 2006-09-13 20:53:17.000000000 +0200
+++ new/libhugetlbfs-1.0/README 2006-10-04 17:16:15.000000000 +0200
@@ -1,12 +1,42 @@
-NOTICE: libhugetlbfs is a technology preview
+10/03/2006 -- libhugetlbfs-1.0 Released

-The libhugetlbfs project is a preview of providing applications with
-transparent access to system huge pages. While the library will provide an
-application with easy access to huge pages when sufficient huge pages have been
-previously allocated on the system, additional development and testing is
-required to provide a stable transition to normal pages in a production
-environment.
-
-Use of this library may introduce instability under certain circumstances.
-Proper configuration of the system huge pages is required and thorough testing
-is highly recommended.
+After roughly one year in development, version 1.0 of libhugetlbfs is here.
+It can be downloaded from SourceForge or the OzLabs mirror:
+
+ http://sourceforge.net/project/showfiles.php?group_id=156936
+ http://libhugetlbfs.ozlabs.org/snapshots/
+
+After a series of preview releases, we have tested a huge array of the
+supported usage scenarios using benchmarks and real HPC applications.
+Usability and reliability have greatly improved. But... due to the
+incredible diversity of applications that exist, there is bound to be a few
+that will not work correctly.
+
+If using libhugetlbfs makes your application slower:
+
+ * Play around with the different combinations of hugetlb malloc and the
+ two different supported link types to see which combination works best.
+
+ * Keep in mind that huge pages are a niche performance tweak and are not
+ suitable for every type of application. They are specifically known to
+ hurt performance in certain situations.
+
+If you experience problems:
+
+ * You've already read the HOWTO document, but read through it again. It
+ is full of hints, notes, warnings, and caveats that we have found over
+ time. This is the best starting point for a quick resolution to your
+ issue.
+
+ * Make sure you have enough huge pages allocated. Even if you think you
+ have enough, try increasing it to a number you know you will not use.
+
+ * Set HUGETLB_VERBOSE=99 and HUGETLB_DEBUG=yes. These options increase
+ the verbosity of the library and enable extra checking to help diagnose
+ the problem.
+
+If the above steps do not help, send as much information about the problem
+(including all libhugetlbfs debug output) to
+libhugetlbfs-devel@xxxxxxxxxxxxxxxxxxxxx and we'll help out as much as we
+can. We will probably ask you to collect things like: straces,
+/proc/pid/maps and gdb back traces.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/VERSION new/libhugetlbfs-1.0/VERSION
--- old/libhugetlbfs-20060913/VERSION 2006-09-13 20:53:17.000000000 +0200
+++ new/libhugetlbfs-1.0/VERSION 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-VERS_1.0 {
- global:
- gethugepagesize;
- hugetlbfs_test_path;
- hugetlbfs_find_path;
- hugetlbfs_unlinked_fd;
- local:
- *;
-};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/debug.d new/libhugetlbfs-1.0/debug.d
--- old/libhugetlbfs-20060913/debug.d 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/debug.d 2006-10-04 17:16:17.000000000 +0200
@@ -0,0 +1 @@
+obj32/debug.o debug.d: debug.c hugetlbfs.h libhugetlbfs_internal.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/elflink.d new/libhugetlbfs-1.0/elflink.d
--- old/libhugetlbfs-20060913/elflink.d 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/elflink.d 2006-10-04 17:16:17.000000000 +0200
@@ -0,0 +1 @@
+obj32/elflink.o elflink.d: elflink.c hugetlbfs.h libhugetlbfs_internal.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/hugeutils.d new/libhugetlbfs-1.0/hugeutils.d
--- old/libhugetlbfs-20060913/hugeutils.d 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/hugeutils.d 2006-10-04 17:16:17.000000000 +0200
@@ -0,0 +1,2 @@
+obj32/hugeutils.o hugeutils.d: hugeutils.c libhugetlbfs_internal.h \
+ hugetlbfs.h hugetlbd.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/ldscripts/elf32ppclinux.xB new/libhugetlbfs-1.0/ldscripts/elf32ppclinux.xB
--- old/libhugetlbfs-20060913/ldscripts/elf32ppclinux.xB 2006-09-13 20:53:17.000000000 +0200
+++ new/libhugetlbfs-1.0/ldscripts/elf32ppclinux.xB 2006-10-04 17:16:15.000000000 +0200
@@ -200,15 +200,14 @@
{
*(.dynbss)
*(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections.
- FIXME: Why do we need it? When there is no .bss section, we don't
- pad the .data section. */
- . = ALIGN(. != 0 ? 32 / 8 : 1);
+ /*
+ * Align here to ensure that the .bss section occupies space up to
+ * _end. Additionally (for huge pages) align to a segment boundary.
+ * This ensures that no normal page mappings will be created in this
+ * segment (after the bss) which could interfere with remapping.
+ */
+ . = ALIGN(256*1024*1024);
} :htlb
- . = ALIGN(32 / 8);
- . = ALIGN(32 / 8);
_end = .;
PROVIDE (end = .);
/* Stabs debugging sections. */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/ldscripts/elf32ppclinux.xBDT new/libhugetlbfs-1.0/ldscripts/elf32ppclinux.xBDT
--- old/libhugetlbfs-20060913/ldscripts/elf32ppclinux.xBDT 2006-09-13 20:53:17.000000000 +0200
+++ new/libhugetlbfs-1.0/ldscripts/elf32ppclinux.xBDT 2006-10-04 17:16:15.000000000 +0200
@@ -194,15 +194,14 @@
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections.
- FIXME: Why do we need it? When there is no .bss section, we don't
- pad the .data section. */
- . = ALIGN(. != 0 ? 32 / 8 : 1);
+ /*
+ * Align here to ensure that the .bss section occupies space up to
+ * _end. Additionally (for huge pages) align to a segment boundary.
+ * This ensures that no normal page mappings will be created in this
+ * segment (after the bss) which could interfere with remapping.
+ */
+ . = ALIGN(256*1024*1024);
} :hdata
- . = ALIGN(32 / 8);
- . = ALIGN(32 / 8);
_end = .;
PROVIDE (end = .);
/* Stabs debugging sections. */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/ldscripts/elf64ppc.xBDT new/libhugetlbfs-1.0/ldscripts/elf64ppc.xBDT
--- old/libhugetlbfs-20060913/ldscripts/elf64ppc.xBDT 2006-09-13 20:53:17.000000000 +0200
+++ new/libhugetlbfs-1.0/ldscripts/elf64ppc.xBDT 2006-10-04 17:16:15.000000000 +0200
@@ -187,15 +187,17 @@
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections.
- FIXME: Why do we need it? When there is no .bss section, we don't
- pad the .data section. */
- . = ALIGN(. != 0 ? 64 / 8 : 1);
+ /*
+ * Align here to ensure that the .bss section occupies space up to
+ * _end. Additionally (for huge pages) align to a segment boundary.
+ * This ensures that no normal page mappings will be created in this
+ * segment (after the bss) which could interfere with remapping.
+ *
+ * XXX: This ALIGN will need to be extended to handle the case where
+ * ends above 1T -- in which case the alignment should be 1T.
+ */
+ . = ALIGN(256*1024*1024);
} :hdata
- . = ALIGN(64 / 8);
- . = ALIGN(64 / 8);
_end = .;
PROVIDE (end = .);
/*. = DATA_SEGMENT_END (.);*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/localversion new/libhugetlbfs-1.0/localversion
--- old/libhugetlbfs-20060913/localversion 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/localversion 2006-10-04 17:16:15.000000000 +0200
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# libhugetlbfs - Easy use of Linux hugepages
+# Copyright (C) 2006 Andy Whitcroft, IBM Corporation
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# as published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+if [ "$#" -lt 1 ]; then
+ echo "Usage: localversion <version file> <source> ..." 1>&2
+ exit 1
+fi
+file="$1"
+
+if [ -f "$file" ]; then
+ read current_version <"$file"
+fi
+version="$current_version"
+
+modified=0
+
+# GIT: check for a git tree.
+mod=`git diff-index HEAD 2>/dev/null`
+if [ "$?" -eq 0 ]; then
+ # This is a GIT repo, see if it was modified.
+ if [ "$mod" != "" ]; then
+ modified=1
+ else
+ # Subtle, if we are in a git archive and the repository
+ # is clean then update the time on the version file
+ # thus ensuring it will be correct in any tarball.
+ touch "$file"
+ fi
+
+ # Try and get a real "tag relative" version name for it.
+ version=`git describe --tags HEAD 2>&1`
+ if [ "$?" -ne 0 ]; then
+ # ok, desperation just take the commit id.
+ version=`git log | awk '{ print $2; exit }'`
+ version="commit<$version>"
+ fi
+
+else
+ # No version control, use the modification times
+ # of the source.
+
+ for s in "$@"
+ do
+ if [ "$s" -nt "$file" ]; then
+ modified=1
+ fi
+ done
+fi
+
+if [ "$current_version" != "$version" ]; then
+ echo "version update: $version"
+ echo "$version" >"$file"
+fi
+
+# Update the c-define for this version, take the modification
+# flags into account.
+version_modified="$version"
+[ "$modified" -eq 1 ] && version_modified="$version_modified (modified)"
+
+if [ -f "$file.h" ]; then
+ read d1 current_version_modified <"$file.h"
+fi
+if [ "$current_version_modified" != "$version_modified" ]; then
+ echo "version string: $version_modified"
+ echo "// $version_modified" >"$file.h"
+ echo "#define VERSION \"$version_modified\"" >>"$file.h"
+fi
+
+exit 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/morecore.c new/libhugetlbfs-1.0/morecore.c
--- old/libhugetlbfs-20060913/morecore.c 2006-09-13 20:53:17.000000000 +0200
+++ new/libhugetlbfs-1.0/morecore.c 2006-10-04 17:16:15.000000000 +0200
@@ -172,7 +172,17 @@
__morecore = &hugetlbfs_morecore;

/* Set some allocator options more appropriate for hugepages */
- mallopt(M_TRIM_THRESHOLD, blocksize / 2);
+
+ /* XXX: This morecore implementation does not support trimming!
+ * If we are forced to change the heapaddr from the original brk()
+ * value we have violated brk semantics (which we are not supposed to
+ * do). This shouldn't pose a problem until glibc tries to trim the
+ * heap to an address lower than what we aligned heapaddr to. At that
+ * point the alignment "gap" causes heap corruption.
+ *
+ * So, for now, disable heap trimming.
+ */
+ mallopt(M_TRIM_THRESHOLD, -1);
mallopt(M_TOP_PAD, blocksize / 2);
/* we always want to use our morecore, not ordinary mmap().
* This doesn't appear to prohibit malloc() from falling back
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/morecore.d new/libhugetlbfs-1.0/morecore.d
--- old/libhugetlbfs-20060913/morecore.d 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/morecore.d 2006-10-04 17:16:17.000000000 +0200
@@ -0,0 +1,2 @@
+obj32/morecore.o morecore.d: morecore.c hugetlbfs.h \
+ libhugetlbfs_internal.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/tests/run_tests.sh new/libhugetlbfs-1.0/tests/run_tests.sh
--- old/libhugetlbfs-20060913/tests/run_tests.sh 2006-09-13 20:53:17.000000000 +0200
+++ new/libhugetlbfs-1.0/tests/run_tests.sh 2006-10-04 17:16:15.000000000 +0200
@@ -25,7 +25,7 @@

if [ -d obj$BITS ]; then
echo -n "$@ ($BITS): "
- PATH="obj$BITS" LD_LIBRARY_PATH="../obj$BITS" $ENV "$@"
+ PATH="obj$BITS:$PATH" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../obj$BITS" $ENV "$@"
fi
}

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/version new/libhugetlbfs-1.0/version
--- old/libhugetlbfs-20060913/version 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/version 2006-10-04 16:56:21.000000000 +0200
@@ -0,0 +1 @@
+1.0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/version.c new/libhugetlbfs-1.0/version.c
--- old/libhugetlbfs-20060913/version.c 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/version.c 2006-10-04 17:16:15.000000000 +0200
@@ -0,0 +1,3 @@
+#include "version.h"
+
+const char libhugetlbfs_version[] = "VERSION: "VERSION;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/version.d new/libhugetlbfs-1.0/version.d
--- old/libhugetlbfs-20060913/version.d 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/version.d 2006-10-04 17:16:17.000000000 +0200
@@ -0,0 +1 @@
+obj32/version.o version.d: version.c version.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/version.h new/libhugetlbfs-1.0/version.h
--- old/libhugetlbfs-20060913/version.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/version.h 2006-10-04 16:56:21.000000000 +0200
@@ -0,0 +1,2 @@
+// 1.0
+#define VERSION "1.0"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libhugetlbfs-20060913/version.lds new/libhugetlbfs-1.0/version.lds
--- old/libhugetlbfs-20060913/version.lds 1970-01-01 01:00:00.000000000 +0100
+++ new/libhugetlbfs-1.0/version.lds 2006-10-04 17:16:15.000000000 +0200
@@ -0,0 +1,9 @@
+VERS_1.0 {
+ global:
+ gethugepagesize;
+ hugetlbfs_test_path;
+ hugetlbfs_find_path;
+ hugetlbfs_unlinked_fd;
+ local:
+ *;
+};

++++++ libhugetlbfs.install.patch ++++++
--- /var/tmp/diff_new_pack.7at4IH/_old 2006-10-09 18:54:18.000000000 +0200
+++ /var/tmp/diff_new_pack.7at4IH/_new 2006-10-09 18:54:18.000000000 +0200
@@ -1,18 +1,18 @@
---
- Makefile | 39 ++++++++++++++++++++-------------------
- 1 file changed, 20 insertions(+), 19 deletions(-)
+ Makefile | 35 ++++++++++++++++++-----------------
+ 1 file changed, 18 insertions(+), 17 deletions(-)

-Index: libhugetlbfs-20060913/Makefile
+Index: libhugetlbfs-1.0/Makefile
===================================================================
---- libhugetlbfs-20060913.orig/Makefile
-+++ libhugetlbfs-20060913/Makefile
+--- libhugetlbfs-1.0.orig/Makefile
++++ libhugetlbfs-1.0/Makefile
@@ -1,4 +1,5 @@
PREFIX = /usr/local
+DESTDIR =

- LIBOBJS = hugeutils.o elflink.o morecore.o debug.o
- SBINOBJS = hugetlbd
-@@ -55,12 +56,12 @@ ifdef CC64
+ BASEOBJS = hugeutils.o version.o
+ LIBOBJS = $(BASEOBJS) elflink.o morecore.o debug.o
+@@ -60,12 +61,12 @@ ifdef CC64
OBJDIRS += obj64
endif

@@ -20,38 +20,35 @@
-LIBDIR64 = $(DESTDIR)$(PREFIX)/$(LIB64)
+LIBDIR32 = $(PREFIX)/$(LIB32)
+LIBDIR64 = $(PREFIX)/$(LIB64)
- LDSCRIPTDIR = $(PREFIX)/$(LIB32)/ldscripts
--BINDIR = $(DESTDIR)$(PREFIX)/bin
+ LDSCRIPTDIR = $(PREFIX)/share/libhugetlbfs/ldscripts
+-BINDIR = $(DESTDIR)$(PREFIX)/share/libhugetlbfs
-SBINDIR = $(DESTDIR)$(PREFIX)/sbin
-DOCDIR = $(DESTDIR)$(PREFIX)/share/doc/libhugetlbfs
-+BINDIR = $(PREFIX)/bin
++BINDIR = $(PREFIX)/share/libhugetlbfs
+SBINDIR = $(PREFIX)/sbin
+DOCDIR = $(PREFIX)/share/doc/libhugetlbfs

EXTRA_DIST = \
README \
-@@ -182,18 +183,18 @@ clean:
- -include $(DEPFILES)
+@@ -202,17 +203,17 @@ endif

obj32/install:
-- @$(VECHO) INSTALL32 $(LIBDIR32)
+ @$(VECHO) INSTALL32 $(LIBDIR32)
- $(INSTALL) -d $(LIBDIR32)
- $(INSTALL) $(INSTALL_OBJ_LIBS:%=obj32/%) $(LIBDIR32)
- $(INSTALL) -d $(SBINDIR)
- for x in $(SBINOBJS); do $(INSTALL) obj32/$$x $(SBINDIR)/$$x; done
-+ @$(VECHO) INSTALL32 $(DESTDIR)$(LIBDIR32)
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR32)
+ $(INSTALL) $(INSTALL_OBJ_LIBS:%=obj32/%) $(DESTDIR)$(LIBDIR32)
+ $(INSTALL) -d $(DESTDIR)$(SBINDIR)
+ for x in $(SBINOBJS); do $(INSTALL) obj32/$$x $(DESTDIR)$(SBINDIR)/$$x; done

obj64/install:
-- @$(VECHO) INSTALL64 $(LIBDIR64)
+ @$(VECHO) INSTALL64 $(LIBDIR64)
- $(INSTALL) -d $(LIBDIR64)
- $(INSTALL) $(INSTALL_OBJ_LIBS:%=obj64/%) $(LIBDIR64)
- $(INSTALL) -d $(SBINDIR)
- for x in $(SBINOBJS); do $(INSTALL) obj64/$$x $(SBINDIR)/$$x; done
-+ @$(VECHO) INSTALL64 $(DESTDIR)$(LIBDIR64)
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR64)
+ $(INSTALL) $(INSTALL_OBJ_LIBS:%=obj64/%) $(DESTDIR)$(LIBDIR64)
+ $(INSTALL) -d $(DESTDIR)$(SBINDIR)
@@ -59,7 +56,7 @@

objscript.%: %
@$(VECHO) OBJSCRIPT $*
-@@ -203,13 +204,13 @@ install: all $(OBJDIRS:%=%/install) $(IN
+@@ -222,14 +223,14 @@ install: all $(OBJDIRS:%=%/install) $(IN
@$(VECHO) INSTALL
$(INSTALL) -d $(DESTDIR)$(LDSCRIPTDIR)
$(INSTALL) -m 644 $(INSTALL_LDSCRIPTS:%=ldscripts/%) $(DESTDIR)$(LDSCRIPTDIR)
@@ -67,12 +64,13 @@
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
for x in $(INSTALL_OBJSCRIPT); do \
- $(INSTALL) -m 755 objscript.$$x $(BINDIR)/$$x; done
+- cd $(BINDIR) && ln -sf ld.hugetlbfs ld
+ $(INSTALL) -m 755 objscript.$$x $(DESTDIR)$(BINDIR)/$$x; done
++ cd $(DESTDIR)$(BINDIR) && ln -sf ld.hugetlbfs ld

install-docs:
-- $(INSTALL) -d $(DOCDIR)
+ $(INSTALL) -d $(DOCDIR)
- for x in $(EXTRA_DIST); do $(INSTALL) -m 755 $$x $(DOCDIR)/$$x; done
-+ $(INSTALL) -d $(DESTDIR)$(DOCDIR)
+ for x in $(EXTRA_DIST); do $(INSTALL) -m 755 $$x $(DESTDIR)$(DOCDIR)/$$x; done

install-tests: install # Force make to install the library first

++++++ libhugetlbfs.ldscript-path.patch ++++++
--- /var/tmp/diff_new_pack.7at4IH/_old 2006-10-09 18:54:18.000000000 +0200
+++ /var/tmp/diff_new_pack.7at4IH/_new 2006-10-09 18:54:18.000000000 +0200
@@ -2,10 +2,10 @@
ld.hugetlbfs | 12 ++++++++++++
1 file changed, 12 insertions(+)

-Index: libhugetlbfs-20060913/ld.hugetlbfs
+Index: libhugetlbfs-1.0/ld.hugetlbfs
===================================================================
---- libhugetlbfs-20060913.orig/ld.hugetlbfs
-+++ libhugetlbfs-20060913/ld.hugetlbfs
+--- libhugetlbfs-1.0.orig/ld.hugetlbfs
++++ libhugetlbfs-1.0/ld.hugetlbfs
@@ -57,6 +57,18 @@ while [ -n "$1" ]; do
shift
done


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread