Use hwloc instead of libtopology

libtopology obsoleted by hwloc.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fix build error

Some toolchains have --no-add-needed by default.

/usr/bin/ld: tests/posix_semaphore1.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'
note: 'sem_post@@GLIBC_2.2.5' is defined in DSO /lib/libpthread.so.0 so try adding it to the linker command line
/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [posix_semaphore1_processes] Error 1

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Add gitignore file to repo

Simple .gitignore to clean up git status output.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
add fallocate test

This one is meant to pound on the page allocator.  Most of the
will-it-scale test require some kind of copy out to userspace
which is pretty slow.  This should allow any access to the
memory being allocated to be kept inside the kernel.

Note that this will fail in fun ways if you point it at a
filesystem that does not support fallocate(), like ramfs for
instance.

Currently, with tmpfs, this seems to bottleneck on the
counters in __vm_enough_memory() when vm.overcommit_memory=1.

Setting vm.overcommit_memory=0 will make things bottleneck on
the zone->lru_lock from the pagevec freeing code.
align read3 buffer for O_DIRECT

O_DIRECT requires that the buffer be page aligned, or it will return -EINVAL.

While we're in here, move read4's alignment to use the same helper function.
allow larger number-of-tasks steps

It takes a darn long time to run these tests on a 160-cpu system.
This lets you do it every-N cpus.  You have to hack the script
for now to do this, but it's quite handy.
Fix build error with binutils --as-needed

--as-needed makes the linker sensitive to the order of object
files and libraries. Our current Makefile hits this issue:

   will-it-scale/main.c:235: undefined reference to `hwloc_topology_init'

Move libraries after object files to fix it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Link threaded tests with -pthread not -lpthread

-pthread adds -D_REENTRANT which can change the behaviour of
various things, so we should use it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Merge branch 'master' of https://github.com/hansendc/will-it-scale into test